相关疑难解决方法(0)

无法访问HttpContext.Current

我无法使用C#4.5访问我的项目MVC4上的HttpContext.Current

我在我的项目中添加了对System.Web的引用,并在控制器页面上添加了using指令...

但我只能访问currentHandler ......

var context = HttpContext.CurrentHandler; //Current
Run Code Online (Sandbox Code Playgroud)

是否HttpContext.Current在C#4.5上弃用?

我看过这个帮助页面:http://msdn.microsoft.com/en-us/library/system.web.httpcontext.aspx

c# asp.net-mvc razor asp.net-mvc-4

58
推荐指数
3
解决办法
10万
查看次数

标签 统计

asp.net-mvc ×1

asp.net-mvc-4 ×1

c# ×1

razor ×1