How to update a running asp.net application?

We have a working asp.net application, which is accessed by various client offices around the world (about 42 offices in 12 countries). Now, after 8 months of posting it, we need to enable updates on 6 pages and add 15 new asp.net pages. Now there is a way by which we could update the existing potential up without removing it offline, that is, stopping it?

+4
source share
4 answers

It really depends on how you deployed the application, but overall the answer is yes - just add new files and you will be turned off and running. You might want to read ASP.Net Dynamic Compilation .

However, if you deployed your site as a precompiled deployment-only application , then the answer is no β€” you will need to completely recompile and redistribute it.

If you add the source code to the application, the application domain will be redesigned. If this bothers you when you say β€œstop” the application, you should know that this can cause a noticeable delay (a few seconds), and your user sessions will reset if you use InProc sessions, but the application will never be inaccessible otherwise .

You can also find the following article very useful - especially the " Compilation Life Cycle " section, which talks about restarting applications. ASP.Net Life Cycle Overview .

+4
source

As @Mendy explained in the comments, just upload the new and changed files and any new / changed files from the bin folder. I understand that you do not want to take it offline, but it will take you a few minutes for you to update the files - if you do not, users will experience unpredictable behavior when accessing it while making changes.

You will also want to run a quick test before allowing users to return, just to make sure you haven't missed anything, for example. no broken links / redirects, all script / css / image files are uploaded fine, etc.

+2
source

You can also use app_offline.htm to inform your users that the site is temporarily unavailable for improvement, etc. http://www.dontcodetired.com/blog/post/Quickly-Take-Down-an-ASPNET-Web-Site.aspx

+2
source

If you really need round-the-clock work time, you can look at load-balanced web servers - they can be removed while the other continues to serve. Please note that this will require some careful management as to how you handle your sessions.

+2
source

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


All Articles