HttpContextBase转换成HttpContext对象

有以下方法:

主要是方式就是通过context获取HttpApplication,然后通过Application获取相应的HttpContext

①HttpContext context=HttpContextBase.ApplicationInstance.Context

②HttpContext context=((HttpApplication)HttpContext.GetService(typeof(HttpApplication))).Context;

上一篇:LeetCode26 Remove Duplicates from Sorted Array


下一篇:VirtualBox启动虚拟机报错0x80004005