关于asp.net中Webconfig配置customErrors自定义错误页面和框架还有session的问题
我在webconfig中加了customErrors节点。来配置自定义作业页面,代码如下:
<customErrors mode="On" defaultRedirect="messageBox.aspx">
<error statusCode="403" redirect="messageBox.aspx" />
<error statusCode="404" redirect="messageBox.aspx" />
</customErrors>
我的网站用到了框架!现在出的问题是。自从加了以上代码后,登陆进去就直接跳到到自定义的错误页面了!我断点看了一下出的错误是session为空!但是我只要把上面自定义错误的页面的代码去掉就没问题!session也不为空!
我加的框架是:
<%@ Page language="c#" Inherits="lnsage.admin._default" CodeFile="default.aspx.cs" %>
<HTML>
<link href="../style.css" rel="stylesheet" type="text/css" />
<head>
<TITLE>框架</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
</head>
<FRAMESET border=0 frameSpacing=0 rows=98,* frameBorder=0>
<noframes>
<center>
<p></p>
</center>
</noframes>
<FRAME name=topFrame src="images/top.aspx" noResize scrolling=no>
<FRAMESET border=0 name=content frameSpacing=0 frameBorder=0 cols=166,*>
<FRAME name=BoardMenu marginWidth=0 marginHeight=0 src="images/menu.aspx" noResize scrolling=no target="main"><FRAME name=main marginWidth=0 marginHeight=0 src="home.aspx" noResize>
</frameset>
</frameset>
</FRAMESET>
</HTML>