gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 00:16:25 27 4
gpt4 key购买 nike

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com