Rakesh Sawant
Rakesh Sawant

Reputation: 281

Global.asax is not publishing and event are not firing in Global.asax

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

Upvotes: 3

Views: 4378

Answers (2)

Devraj Gadhavi
Devraj Gadhavi

Reputation: 3611

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

Upvotes: 1

Rakesh Sawant
Rakesh Sawant

Reputation: 281

i also uploaded App_global.asax.compiled and it works

Upvotes: 2

Related Questions