What is the difference between HostingEnvironment class and HttpRuntime class?

北城以北 提交于 2019-12-08 17:32:17

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/6373310/what-is-the-difference-between-hostingenvironment-class-and-httpruntime-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!