HttpContext.Current.ApplicationInstance.Application vs HttpContext.Current.Application
2 answers
Application
and ApplicationInstance.Application
- two versions of the same HttpApplicationState object.
In HttpApplicationState, the link is:
A single instance of the HttpApplicationState class is created the first time a client requests any resource URL from a specific ASP.NET Application Virtual Directory. A separate, separate instance created for each ASP.NET application on the web server. A link to each instance is then opened through the embedded Application object.
Summarizing:
-
Application
the object is global to the web server. -
ApplicationInstance.Application
the object is local to the application to which the request belongs. (such as a site or virtual directory application)
This is explained in this post.
+3
source to share