谁可以帮我这个?我根本不知道该怎么办。从开始到结束,我甚至不知道如何创建标签或什么也不知道。帮我?这是它的外观:
>'/ HRX'应用程序中的服务器错误。运行时错误说明:服务器上发生应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以在本地服务器计算机上运行的浏览器中查看。Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
Server Error in '/HRX' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- 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>
答案 0 :(得分:1)
如果您可以远程访问服务器,请尝试在本地浏览服务器上的页面。
否则尝试将customerrors模式设置为“Off”并进行部署。
<customErrors mode="Off"/>
如果你采用任何一种方式,你都希望看到异常StackTrace。这可能会让你更好地了解错误。
答案 1 :(得分:1)
除了其他人所说的,它还有助于安装某种错误处理功能。对于近乎即插即用的解决方案,请查看ELMAH(可以使用NUGET轻松安装)。这将保留ASP.NET站点中所有未处理异常的数据库,甚至可以在遇到问题时通过电子邮件向您发送错误详细信息。
此外,您还需要设置custom error page,向您的用户说明发生了意外错误。这看起来更专业。