What is the difference between the HostingEnvironment class and the HttpRuntime class?

As you can see here the life cycle of an ASP.NET application , there are two photos. The first created the HostingEnvironment class in AppDomain, the second created the HttpRuntime class. From their definitions, I do not understand the difference between them. When is one created and when is the second created during the application life cycle? What is the difference between the HostingEnvironment class and the HttpRuntime class in the apllication lifecycle context?

+7
source share
1 answer

You cannot inherit the HostingEnvironment class and provide application and application management functions with a managed application in your application domain, where, because the HttpRuntime class provides a set of ASP.NET runtime services for the current application.

MSDN

+1
source

All Articles