Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#:System.Web.HttpResponse类在intellisense中不可用_C#_Asp.net_Visual Studio_Httpresponse - Fatal编程技术网

c#:System.Web.HttpResponse类在intellisense中不可用

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

所以我正在用C#Visual Studio 2013编写一个程序。在我的代码顶部,在我的使用中,我有:

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的引用?