I am trying to convert ASP.NET page to MVC Controler and get a build error.
'System.Web.HttpContextBase' does not contain a definition for 'Current' and no extension method 'Current' accepting a first argument of type 'System.Web.HttpContextBase' could be found
This is the line of code that I need to convert from ASP.NET to MVC
byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength);
The compiler underlines the: HttpContext. Current .Request.ContentLength
尝试使用ControllerContext.HttpContext.Current
您可以使用HttpContext.Request.ContentLength
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.