错误页的local地址为http://localhost/PASS/404.aspxweb.config
写入了
<customErrors mode="RemoteOnly" defaultRedirect="/PASS/404.aspx"></customErrors>IIS
在default website下面的PASS的属性里面,自定义错误 404的属性改成了
message type: URL
URL: /PASS/404.aspx可是当我输入一个错误的页地址例如http://localhost/PASS/123.aspx,还是会出现系统生成的那个白色的错误页The resource cannot be found.
Server Error in '/PASS' Application.
--------------------------------------------------------------------------------The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested Url: /PASS/123.aspx
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
是不是我设置的地方有什么错误,或者还有别的什么地方我没有改?
麻烦各位湘西说说,谢了!!!
写入了
<customErrors mode="RemoteOnly" defaultRedirect="/PASS/404.aspx"></customErrors>IIS
在default website下面的PASS的属性里面,自定义错误 404的属性改成了
message type: URL
URL: /PASS/404.aspx可是当我输入一个错误的页地址例如http://localhost/PASS/123.aspx,还是会出现系统生成的那个白色的错误页The resource cannot be found.
Server Error in '/PASS' Application.
--------------------------------------------------------------------------------The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested Url: /PASS/123.aspx
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
是不是我设置的地方有什么错误,或者还有别的什么地方我没有改?
麻烦各位湘西说说,谢了!!!
{
//这里转到错误页面试试
}
<error statusCode="404" redirect="LoginReg.aspx" />
</customErrors>see:
http://www.codeproject.com/aspnet/JcGlobalErrorHandling.asp
On 自定义错误页。 自定义错误页。
Off ASP.NET 错误页。 ASP.NET 错误页。
RemoteOnly ASP.NET 错误页。 自定义错误页。