Sazug
Sazug

Reputation: 382

Application domain restarts when physical path changes

I am trying to minimize downtime when updating web application on IIS6 - I have two folders (one with current application and one with new code). Once I switch virtual directory's physical path to new folder, recompilation occurs ("Application is shutting down. Reason: The physical path of the application changed."). However, if I switch physical paths couple more times between old and new, sometimes recompilation does not occur. E.g.:

What is the reason that domain is not always restarted?

Upvotes: 1

Views: 364

Answers (1)

Sazug
Sazug

Reputation: 382

ASP.NET uses per application hash code which is different for each application (computed from application name, physical path and probably other parameters). Switching back and forth between physical paths results in two different codes (and two folders in "Temporary ASP.NET files"). Once applications were JIT'ed no shutdown occurs.

Upvotes: 2

Related Questions