Does the Application_Start event in global.asax fire when the code is republished?

Is Application_Start called in global.asax when the new published code is stored in the IIS root for the project,

+6
source share
2 answers

Application_Start starts every time the application pool is processed, which usually happens when some files in the bin or web.config folder are updated. Therefore, if you republish your site and update some of these files, IIS will download the application, and Application_Start will fire the next time the request appears.

+8
source

If your Global.asax Application_Start code does not run on the published IIS website:

Try changing your AppPool application to ASP.NET v4.0 Classic. Stop AppPool. Start AppPool. Restart AppPool.

Check if it works.

0
source

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


All Articles