“/”应用程序中的服务器错误。

远程主机强迫关闭了一个现有的连接。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。

源错误:


行 75:     { 
行 76:         System.Net.WebClient wc = new System.Net.WebClient(); 
行 77:         byte[] data = wc.DownloadData(url); 
行 78:         return data; 
行 79:     } 

源文件: d:\web\changhui.com\Global.asax    行: 77

堆栈跟踪:


[SocketException (0x2746): 远程主机强迫关闭了一个现有的连接。]
   System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131

[IOException: 无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接。。]
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +294
   System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) +26
   System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) +297

[WebException: 基础连接已经关闭: 接收时发生错误。]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +287
   System.Net.WebClient.DownloadData(Uri address) +106
   System.Net.WebClient.DownloadData(String address) +29
   ASP.global_asax.get_data(String url) in d:\web\changhui.com\Global.asax:77
   ASP.global_asax.Session_Start(Object sender, EventArgs e) in d:\web\changhui.com\Global.asax:28
   System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +8888092
   System.Web.SessionState.SessionStateModule.CompleteAcquireState() +237
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +504
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +66
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155


版本信息: Microsoft .NET Framework 版本:2.0.50727.8810; ASP.NET 版本:2.0.50727.8762
Baidu
sogou