2012-08-30 72 views
0

我想将ASP.NET页面转换为MVC控制器并获得构建错误。将ASP.NET页面转换为MVC控制器HttpContext.Current错误

“System.Web.HttpContextBase”不包含对“当前”和没有扩展方法“当前”接受类型的第一个参数定义“System.Web.HttpContextBase”可以发现

这是我需要从ASP.NET转换为MVC的代码行

byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength); 

编译器强调:HttpContext。 当前 .Request.ContentLength

回答

2

尝试使用ControllerContext.HttpContext.Current

相关问题