How to dynamically fix a running ASP.NET application?

Does anyone have an example of how to fix a running asp.net application? The scenario that I am assuming is that the application can look at a well-known central server for newer versions. Download newer files to a temporary location, and then fix it.

The problems that I see is that any file changes will get the file watcher and reboot the application domain, which will stop the current repair process. I think that every file written will cause the application to restart.

+5
source share
5 answers

If you are not viewing certain files on specific files, you can update existing aspx files without slowing down applications. The next time the user refreshes the browser, he will see the page refresh. However, be careful if you have added additional additional controls to the page, and the DLL is not yet updated, you are faced with problems.

If you update the web.config or DLL files for the application, this will restart the ASPNET workflow, and all new users will experience the “first lag” that you usually expect.

If you are worried about this process and can afford a little "downtime", I suggest you create a script that does the following:

  • App_Offline.htm -. IIS , - .NET. App_Offline_Disabled.htm , .

  • , , // .

  • ( ) App_Offline.htm, IIS . script, , " ", - .

, , , , , .

+3

?

, . , . .

+3

- . , script, ().

, ( ) . , .

0

, filewatcher . , , . , . , , , ?

0

If someone else cannot use the app_offline.htm trick, I found this article explaining how to disable file monitoring for subfolders

http://www.dominicpettifer.co.uk/Blog/36/stop-iis-appdomain-restarts-when-a-folder-is-deleted

0
source

All Articles