服务器上面是这样配置的
 <customErrors mode="Off" defaultRedirect="errorPage.html">
  <error statusCode="403" redirect="forbidden.html" />
  <error statusCode="404" redirect="notFound.html" />
  </customErrors>但是出现一个问题,我在试用的时候发现,如果是.aspx里的程序出错,那是可以跳转的。但是如果是一个不存在的问题html文件,无效。不知道大家有没有遇到过。正确的地址http://192.168.1.3/brand20100613140219156.html
错误的地址http://192.168.1.3/brand20100613140219156asasas.html
但是错误的地址并没到404这个页面去
直接报访问提示错误 
而是直接报RemoteOnly On  我都试过了  IIS中添加映射也添加了   不知道什么错误了   

解决方案 »

  1.   

    不明白,应该不用设置映射,好像是配置customErrors,具体,我也忘了,没怎样用你百度一下看看
      

  2.   

    <customErrors mode="On" defaultRedirect="errorPage.html">
      

  3.   

    MSDN customErrors 
      

  4.   

    在那个application_error中写上code来进行跳转。
      

  5.   

    怎么通过application_error它来捕获 400 403 404  错误了  谢谢  求一位好心的大侠告诉我写写
      

  6.   

    添加 Global.asax 文件        protected void Application_Error(object sender, EventArgs e)
            {
                // 在出现未处理的错误时运行的代码
                Response.Redirect("/index.aspx");
                Response.End();
            }
      

  7.   

    void Application_Error(object sender, EventArgs e)
    {
        Exception ex = Server.GetLastError();
        if (ex is HttpException)
        {
            if (((HttpException)(ex)).GetHttpCode() == 404)
                Server.Transfer("~/Error404.aspx");
        }
        // Code that runs when an unhandled error occurs
        Server.Transfer("~/DefaultError.aspx");}
      

  8.   

     protected void Application_Error(object sender, EventArgs e)
      {}我用这个方法在试用的时候发现,如果是后缀是.aspx里的程序出错,那是可以跳转的我规定的错误页面。但是如果是一个不存在的问题html文件,无效就是这个错误了  看起来一点都不友好   各位大虾  怎么解决呀