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

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

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

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

源错误:


行 59:         request.Method = "Get";
行 60: 
行 61:         HttpWebResponse response = (HttpWebResponse)request.GetResponse();
行 62:         StreamReader streamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
行 63:         var s = streamReader.ReadToEnd();

源文件: e:\WEB\wwwroot\www.5588.tv\hot\zhibo\History.aspx.cs    行: 61

堆栈跟踪:


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

[IOException: 无法从传输连接中读取数据: 远程主机强迫关闭了一个现有的连接。。]
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +291
   System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) +29
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +156
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +59
   System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +49
   System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +162
   System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +121
   System.Net.TlsStream.CallProcessAuthentication(Object state) +42
   System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +166
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +21
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +64
   System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +795
   System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +52
   System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +21
   System.Net.ConnectStream.WriteHeaders(Boolean async) +388

[WebException: 基础连接已经关闭: 发送时发生错误。]
   System.Net.HttpWebRequest.GetResponse() +1390
   zhibo_History.ApiGet(String url) in e:\WEB\wwwroot\www.5588.tv\hot\zhibo\History.aspx.cs:61
   zhibo_History.GetLives() in e:\WEB\wwwroot\www.5588.tv\hot\zhibo\History.aspx.cs:51
   zhibo_History.Page_Load(Object sender, EventArgs e) in e:\WEB\wwwroot\www.5588.tv\hot\zhibo\History.aspx.cs:16
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.6.1055.0