Sagar
Sagar

Reputation: 1727

Does Application_Start event in global.asax fires when code is re-published?

Does the Application_Start in global.asax called when the new published code is kept in IIS web root for the project,

Upvotes: 9

Views: 6743

Answers (2)

germancoines
germancoines

Reputation: 1

If your Global.asax Application_Start code is not firing on a IIS published web:

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

Check if it works.

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1039498

Application_Start triggers everytime the application pool is recycled which normally happens when you update some of the files in the bin folder or web.config. So if you republish your site and update some of those files IIS will unload the application and Application_Start will fire next time a request comes in.

Upvotes: 10

Related Questions