I've been developing an ASP .NET 3.5 web application against Cassini, the built-in web development server, rather than against IIS.
In my Global.asax file, in the Application_Start event handler, I have some code which logs the fact that the website has started up. This all works fine with Cassini.
Since deploying the site to a virtual directory on a test server using IIS6, I am finding there are no log entries being written, and so I'm concluding that the Application_Start handler is not firing.
I then tried removing the virtual directory and running the site directly out of the root of the website on the test server, but it didn't make any difference - still no log entry for application start.
I know these events should fire irrespective of my deployment environment, has anyone got any ideas what is going wrong here?
An ASP.NET site can run without the global.
Application_Error() – fired when an error occurs. Session_End() – fired when the session of a user ends. Application_End() – fired when the web application ends. Application_Disposed() - fired when the web application is destroyed.
I had a similar problem and I was wrestling with it for several days. The initial problem was something else - cookies not being set in Application's EndRequest handler. Finally I somehow managed to realize, that the problem actually was that the event is not being fired at all. It took some time to find that out, because all was working fine on my machine. But on the production server - quiet as a tomb.
I am only writing this, because I really hope to save from troubles at least one person.
The real reason for the problem was a missing global.asax file on the production server.
The global.asax file was present on my computer, because the development environment is located there. I had prepared a deployment bat file, which coppies files from the development folder, removes the unnecessary ones and makes a package. Well - the global.asax file was marked for deletion in that script. After starting to deploy it all the problems went away.
I hope I helped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With