在web.config下添加代码
 <customErrors mode="On" defaultRedirect="GenericErrorPage.htm">
    <error statusCode="404" redirect="404Error.htm"/>
  </customErrors>
出错
消息 1 未能找到元素“customErrors”的架构信息。 D:\C 15 4
消息 2 未能找到特性“mode”的架构信息。 D:\C 15 17




解决方案 »

  1.   

    或者直接  替换成 <customErrors mode="Off"/>
      

  2.   

    The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.
      

  3.   

    你的头像好可爱!检查web.config.
      

  4.   

    估计是web.config出现问题了,楼主调试看看