Recycle Current Application Context in Asp.net


Below is the code which is used to recycle or unload resources from current application context, it is very useful when you want to recycle current application context.

HttpRuntime.UnloadAppDomain();

The above code terminates the current application. The application restarts the next time a request is received for it.

UnloadAppDomain is useful for servers that have a large number of applications that infrequently receive requests. Rather than keep application resources alive for the lifetime of the process, UnloadAppDomain allows programmatic shutdown of unused applications.

Tags: , ,

Comments & Responses

One Response so far.

  1. Kara says:

    Thanks this what I needed to recycle current application context.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


8 + = 16

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>