asp.net - Global.asax 未发布且事件未在 Global.asax 中触发

标签 asp.net global-asax

我正在开发 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/

相关文章:

asp.net - 让 Visual Studio 2010 Profiler 与 ASP.Net 一起工作?

ASP.Net Session_Start 事件未触发

c# - 纠正我在 mvc 中的 url 路由

c# - 一个asp.net页面结构问题

javascript页面加载发生在按钮单击时

c# - MVC 中的 post 问题

c# - 使用 KendoUI Grid,如何将可选图像或图标添加到行模板中?

c# - .net session 状态已创建 session ID,但无法保存它,因为响应已被应用程序刷新

asp.net-mvc-3 - 执行子请求时出错

c# - 如何使用 global.asax 中的 Server.MapPath()?