asp.net - 在 ASP.NET 中启用未处理异常的事件日志记录

标签 asp.net iis

我收到此错误:

Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.



但是,应用程序事件日志中没有错误。 所以我想知道在 IIS 或启用日志记录的虚拟站点中是否有特定设置?

更改 web.config 中的 customerror 设置似乎没有效果。我不认为它甚至走得那么远。

IIS 6、Windows Server 2003

最佳答案

打开 IIS 元数据库...
%systemroot%\system32\inetserv\metabase.xml

在 IIS 元数据库中检查 AspErrorsToNTLog 不是 FALSE。
如果是,请更改为 TRUE 并保存。

http://msdn.microsoft.com/en-us/library/ms524984(v=vs.90).aspx

使用 IIS 管理器启用元数据库的运行时编辑功能

  • 在 IIS 管理器中,右键单击本地计算机,然后单击“属性”。
  • 选中启用直接元数据库编辑复选框,然后单击确定。

  • 修改 IIS 元数据库
  • 在文本编辑器中打开 Metabase.xml 文件。此文件的默认路径为 systemroot\system32\inetserv\metabase.xml
  • 修改您希望在 Metabase.xml 文件中更改的配置数据库属性。
  • 保存对文件的更改,然后关闭文本编辑器。
  • 关于asp.net - 在 ASP.NET 中启用未处理异常的事件日志记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3462369/

    相关文章:

    asp.net - 使用 Microsoft.Web.Administration 所需的权限

    javascript - 关闭通过 Javascript 从代码隐藏创建的弹出窗口

    c# - 从 xml 中读取属性

    javascript - ASP :label and javascript getElementById

    ssl - 从 ssl-terminating-point 后面的 glassfish 连接到第三方双向 https ws

    iis - 如何设置IIS ARR请求超时时间?

    c# - 有没有办法检查页面是否已从外部来源登陆

    javascript - ASP.NET MVC 验证不适用于 Bootstrap 模式

    go - 如何为服务器发送事件(SSE、EventStream)配置 IIS 的 HTTPPlatformHandler

    visual-studio-2010 - 在 Visual Studio 2010 上调试时 IIS 超时