0

We are currently developing an asp.net mvc app to replace our old classic asp applications.

Because we just uploaded our .asp files to the production servers in the past, we want to do the same thing with the compiled dll that .net produces.

Now, I was wondering, what happens to open requests to the application when the webserver reloads the assembly?

kapuetze
  • 35
  • 1
  • 8
  • See the answers to this question: https://stackoverflow.com/q/226581/3805124 Most are referring to IIS and ASP.Net – PhilS Feb 01 '19 at 09:30
  • In general when you recycle IIS gracefully (i.e. its not crashing) it will complete all received requests before shutting down the old appPool. See https://serverfault.com/a/634207 – PhilS Feb 01 '19 at 09:34
  • What I take from the SO link, is that we are able to change the dll in the bin directory without having to shut down the app pool. Shadow copy will take care of draining connections for us before using the new dll. Very helpful, thanks. – kapuetze Feb 01 '19 at 09:54
  • that's a bit of a stretch, I would test it, but gracefully terminating current requests is not the same with allowing you to change dlls while your application is still running – Andrei Dragotoniu Feb 01 '19 at 11:51

1 Answers1

1

classic asp is a scripting language and does not need to be compiled, so you can override files in production to your heart's content.

MVC however requires compilation, temp files are created and used. As such you cannot simply override dlls in a running system, the dlls will be in use.

You will need to stop your application which will kill all connections and not accept any more requests, do the upload, recompile your application and then restart it.

All this is usually done very quickly with a CI/CD pipeline. You will probably want to create a process around this, maybe make the website unavailable for a while, but this depends on what kind of system you are running and how critical it is. If you need it up 24/7 without any downtime then you'll need some creative ideas

Andrei Dragotoniu
  • 6,155
  • 3
  • 18
  • 32