How to make ASP.Net invalidate (and therefore reload) the current application instance?

Basically, I want an effect that could happen if I had to edit the web.config file. The application basically completely unloads itself and starts again, thereby restarting Application_Start, and also discarding any dynamically created types created by a non-existing AppDomain.

EDIT

I need to do this in my C # code inside my web application. I know that this can be done; I did this many years ago, but since then I lost the code and forgot how I did it.

+3
source share
6 answers

HttpRuntime.UnloadAppDomain(). , web.config. .

+7

"" web.config(.. ) bin . , , , , .

+1

, , : P

:

HttpRuntime.UnloadAppDomain();
+1

, . stackoverflow . ( , )

+1

, reset .

, .

0

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


All Articles