我正在开发 ASP.NET Web 应用程序,对于未处理的异常,我正在使用 Global.asax 文件 我在其中编写了将错误日志写为
的逻辑Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
'Code that runs when an unhandled error occurs
End Sub
这一切都在本地工作,但在发布网站 global.asax 时未发布 我仍然将 global.asax 上传到远程服务器,但事件没有触发 我的应用程序使用 IIS 7 作为 Web 服务器
我需要任何类型的配置吗如果您有任何解决方案建议
最佳答案
我还上传了 App_global.asax.compiled 并且它有效
关于asp.net - Global.asax 未发布且事件未在 Global.asax 中触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12890068/