c#:System.Web.HttpResponse类在intellisense中不可用
所以我正在用C#Visual Studio 2013编写一个程序。在我的代码顶部,在我的使用中,我有:c#:System.Web.HttpResponse类在intellisense中不可用,c#,asp.net,visual-studio,httpresponse,C#,Asp.net,Visual Studio,Httpresponse,所以我正在用C#Visual Studio 2013编写一个程序。在我的代码顶部,在我的使用中,我有: using System.Web; 但当我试着用这句话时: HttpResponse httpResp = (HttpResponse)response; 然后Intellisense说没有HttpResponse类,尽管HttpResponse是System.Web命名空间的一部分,但根据此页面: 此外,它没有给我任何选项,关于我还可以导入什么使该类可用。我做错了什么?HttpResp
using System.Web;
但当我试着用这句话时:
HttpResponse httpResp = (HttpResponse)response;
然后Intellisense说没有HttpResponse类,尽管HttpResponse是System.Web命名空间的一部分,但根据此页面:
此外,它没有给我任何选项,关于我还可以导入什么使该类可用。我做错了什么?HttpResponse是否已弃用?如果是,是否有其他方法获取http响应的状态代码 有多个名称空间为System.Web的dll,例如System.Web.Entity。您需要添加对基本System.Web dll的引用,它应该可以工作。检查您的项目引用,您可能缺少Syetem.Web。您是否引用System.Web.dll?您的项目是否有对System.Web.dll的引用?