文章内容

2018/1/6 10:35:01,作 者: 黄兵

HttpContext.Current 缺少using引用

我的项目在使用mvc5的时候提示:

HttpContext.Current是否缺少using引用?

我在我的项目中添加了对System.Web的引用,并在我的控制器页面上添加了使用说明

解决方案:

你有没有在System.Web程序中包含程序集?

using System.Web;

如果不是,请尝试指定System.Web命名空间,例如:

 System.Web.HttpContext.Current

参考文章:Can't access to HttpContext.Current

分享到:

发表评论

评论列表