然后在“解决方案资源管理器”中展开“web reference”——“webservices 名”——“Reference.map”——“Reference.cs(.vb)”;
cs文件中添加如下代码:
using System.Net;
protected override WebRequest GetWebRequest( Uri uri)
{
HttpWebRequest webRequest = ( HttpWebRequest)base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = HttpVersion.Version10;
return webRequest;
}
protected override WebRequest GetWebRequest( Uri uri)
{
HttpWebRequest webRequest = ( HttpWebRequest)base.GetWebRequest(uri);
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = HttpVersion.Version10;
return webRequest;
}