我正在使用使用 asp 创建的 asp.net 页面修改网站。在我正在使用的 web.config 文件中
<system.web>
<compilation debug="true" strict="false" explicit="true" tarrgetFramework="4.0"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="1048576" executionTimeout="3600" />
<customErrors mode="Off"/>
</system.web>
也试过
<customErrors mode="RemoteOnly" defaultRedirect="error.htm"/>
但仍然发生错误
运行时错误
说明:服务器上发生应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以被本地服务器机器上运行的浏览器查看。
详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在位于当前 Web 应用程序根目录的“web.config”配置文件中创建一个标签。然后,此标记应将其“模式”属性设置为“关闭”。
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
注意:您看到的当前错误页面可以通过修改应用程序配置标记的“defaultRedirect”属性以指向自定义错误页面 URL 来替换为自定义错误页面。
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
它的解决方法是什么??