<!-- Web.Config Configuration File --><configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 

解决方案 »

  1.   

    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    改成:
    <customErrors mode="Off"/>
      

  2.   

    一般将<customErrors mode="Off"/>将会出现出错提示,不会转到定制的错误页面;<customErrors mode="on"/>有时为了避免让用户看见这类不友好的信息,才定制出错页面;这里需注意mycustompage.htm是否路径设置为应用程序虚拟根目录下;
      

  3.   

    这里需注意mycustompage.htm是否路径设置为应用程序虚拟根目录下;什么意思?
    不明白
      

  4.   

    就是将该mycustompage.htm放到浏览路径所在的目录下;譬如\\localhost\testName,则testName设置的路径下;
      

  5.   

    还是不懂,我现在的问题该怎么解决?
    我做个单独的页面测试时可以的,但是我下了一个ASP.NET论坛就预览不了,好郁闷,我下了好多都不能的,都是这个错误,怎么回事呢?
      

  6.   

    <configuration>
        <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
        </system.web>
    </configuration>
    这样设置 如果出现错误就会跳转道mycustompage.htm页面 不能看到实际的错误提示
    改成:
    <customErrors mode="Off"/>  后就可以看到实际的错误提示了
      

  7.   

    但是我下了一个ASP.NET论坛就预览不了,好郁闷,我下了好多都不能的,都是这个错误,怎么回事呢?
    需要设置为 默认应用程序
      

  8.   

    iis----默认web 站点----你的工程名称右键----属性----目录---应用程序名--创建  ---确定
      

  9.   

    或者自己重新在iis创建个虚拟目录再试试;
    不行的话,将web.Config贴出来分析下。