I have an application that works great on my development workstation but fails when the application is deployed to the live environment. It seems that Application_Start is not being called in the live environment.
Asked
Active
Viewed 1,242 times
5
-
2When are you expecting it to be called? On the server, it will only be called once, after its application pool starts in IIS and the first request is made, then never again unless you restart the machine/IIS/your app pool... – Dave Markle Oct 23 '08 at 11:25
1 Answers
8
I was able to fix it by removing the PrecompiledApp.config file that was in the root directory of the web site on our test server. I'm guessing that file was a holdover from when the project was a Web Site project. I recently converted it over to a Web App project. So if you are building a Web App project, make sure you DON'T have a PrecompiledApp.config file on your target server.

vharron
- 1,138
- 11
- 20