Global.asax is not publishing and event are not fi

2020-02-06 10:25发布

I am developing ASP.NET web application and for unhandled exception i am making use of Global.asax file Where I wrote a logic to write the error logs as

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)

        'Code that runs when an unhandled error occurs

End Sub

It all works locally but when published the website global.asax not being published still i uploaded global.asax to remote server but events are not firing My application uses IIS 7 as a Web server

Do i need any sort of configuration Suggest if you have any solution

2条回答
做个烂人
2楼-- · 2020-02-06 10:53

We tried a lot of things.

  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

We also tried putting the below files in root and bin directories.

  1. App_global.asax.dll and App_global.asax.compiled files
  2. PrecompiledApp.config

None of it worked!

We had to put raw Global.asax instead of pre-compiled dll, in order to fire the global events, for our asp .net 2.0 website.

Hope this helps someone! Cheers! Happy coding! :D

查看更多
淡お忘
3楼-- · 2020-02-06 10:55

i also uploaded App_global.asax.compiled and it works

查看更多
登录 后发表回答