WEB。config的设置是<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>要怎么修改啊!

解决方案 »

  1.   

    customErrors mode="RemoteOnly"
    是远程的用户看到自定义错误页面GenericErrorPage.htm
    本地看到真实的错误页面
    写的对啊
      

  2.   

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
      

  3.   

    别在Application_Error里面写东西,只在那个customerror里定义看看行吗
      

  4.   

    Global.asax里: void Application_Error(object sender, EventArgs e) 
        {        System.Web.HttpContext.Current.Response.Write("error");    }
    web.config里:
    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
      </customErrors>Default.aspx.cs里:
    protected void Page_Load(object sender, EventArgs e)
        {
            int i = 0, j = 0;
            int x=i/j;
        }结果不是显示一个error 而是传统的错误提示。这怎么回事啊!悲剧了
      

  5.   

    哪位大哥写一个简易的这样的网站 发给我分析也好啊 
    Global的Application_Error一直不能用。
    但是我在
    void Application_Start(object sender, EventArgs e) 
        {
            
            System.Web.HttpContext.Current.Response.Write("aaaaaaaaaa");    }
    却能正常输入的网页去
      

  6.   

    远程 怎么搞啊 
    我vs2008的调试看到是传统的提示
    用iis架设 用ie开 http://localhost 也是传统提示
    难道 iis架设打开http://localhost还是远程吗?
      

  7.   

    customErrors mode设置成On或Off都不能显示自定义错误。
      

  8.   

    设置为 "Off" 以禁用自定义错误信息
    设置为"On" 始终显示自定义(友好的)信息。
    设置为"RemoteOnly" 只对不在本地 Web 服务器上运行的用户显示自定义(友好的)信息。