josepainumkal
josepainumkal

Reputation: 1733

How to avoid ASP MVC application from getting freeze and throwing exception while replacing its entire web files?

In our ASP.NET MVC application, we have a 'load' button which the user can click to update the current application to its newer version. During the loading of newer version, all the web files are removed and new files are copied back and this process will take 1-2 minutes.

Issue: Since the files are getting removed and replaced back, my application will stuck during the process and throw an exception. Once the files are replaced back, everything works fine after a simple reload. Please give me some suggestions how we can avoid the freezing of the application during the loading process ? (like showing a model popup in between, and once the files are copied back, do a reload, etc). Any ideas/suggestions are welcome. Thanks

Upvotes: 1

Views: 259

Answers (1)

Fran
Fran

Reputation: 6530

You need to do something like this.

ASP.NET 2.0 - How to use app_offline.htm

copy the app_offline.html to the root of your site.

copy the application out

delete the app_offline.html

this will return the offline page for all requests to your application while you are copying the files out.

Once you delete app_offline, your application will be available.

Upvotes: 1

Related Questions