2012-10-15 108 views
3

我正在开发ASP.NET Web应用程序和未处理的异常我正在利用 Global.asax文件我写了一个逻辑来写错误日志作为Global.asax没有发布和事件没有在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服务器

我需要任何配置建议如果你有任何解决方案

+0

您是否还可以显示您在web.config上设置了哪些错误处理? – Aristos

+0

web.config是由.net 4.0默认生成的,我只添加了连接字符串,没有其他的东西 –

+0

那么,有什么' Aristos

回答

2

我还上传App_global.asax.compiled和它的作品

+3

我有同样的问题。你能详细说明吗?你从哪里获得该文件并将其上传到了哪里? – ArtK

1

我们尝试了很多东西。

  1. global.asax works on local computer but not after i publish to server
  2. Why are the Global.asax events not firing in my ASP .NET website?
  3. Global.asax not firing for Release build
  4. Mystery of Global.asax in ASP.NET MVC application

我们也试图把以下文件rootbin目录。

  1. App_global.asax.dllApp_global.asax.compiled文件
  2. PrecompiledApp.config

没有的,它的工作!

我们必须把原始Global.asax而不是pre-compiled dll,以便为我们的asp.net 2.0网站发布全球事件。

希望这可以帮助别人!干杯!快乐的编码! :D

相关问题