Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between HostingEnvironment class and HttpRuntime class?

As you can see here ASP.NET Application Life Cycle, there are two pictures. On the first there is created HostingEnvironment class in AppDomain, on the second is created HttpRuntime class in it. From their definitions i dont understand the difference between them. When is created one and when is created the second during application life cycle? What is the difference between HostingEnvironment class and HttpRuntime class in context of apllication life cycle?

like image 980
sanjuro Avatar asked Jun 16 '11 14:06

sanjuro


1 Answers

You cannot inherit a HostingEnvironment class and it provides application-management functions and application services to a managed application within its application domain where as HttpRuntime class provides a set of ASP.NET run-time services for the current application.

MSDN

like image 159
Sev Avatar answered Oct 11 '22 02:10

Sev