Why does Application_Start work in Cassini, but not in IIS7?

I have an ASP.NET 3.5 sp1 application that is under development in Cassini. The application includes a global.asax file that should run some code - it works fine in Cassini, but in IIS the debugger never hits this function. Why is this code not working?

+3
source share
4 answers

Perhaps in Cassini, the application starts when Cassini starts. In II7, the service, the application is already running, and when you start the debugger, VS attaches only the debugger. Can you try to start the debugger and recycle the pool in the IIS console to see how the application restarts?

+2

w3wp.exe? , , Application_Start .

+1

, , , , ? .

+1

I see the same problem with a WCF web project running in IIS7. The very first line of code in Application_Start () is a log entry, and I never get it. In addition, other objects that must be initialized to Application_Start are never created, and the rest of my code fails because of this. Does anyone ever notice something? It works great in Cassini ...

0
source

Source: https://habr.com/ru/post/1706669/


All Articles