Server Error in '/' Application.

Authentication failed because the remote party has closed the transport stream.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

Source Error:


Line 33:         {
Line 34: 
Line 35:             string result = webClient.DownloadString(url);
Line 36: 
Line 37:             XDocument document = XDocument.Parse(result);

Source File: d:\inetpub\webs\studiopascaleit\Home.aspx.cs    Line: 35

Stack Trace:


[IOException: Authentication failed because the remote party has closed the transport stream.]
   System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) +285
   System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +206
   System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +286
   System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest, Boolean renegotiation) +366
   System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest, Boolean renegotiation) +193
   System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +532
   System.Net.TlsStream.CallProcessAuthentication(Object state) +39
   System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +259
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +22
   System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +57
   System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +782
   System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +53
   System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +102
   System.Net.ConnectStream.WriteHeaders(Boolean async) +433

[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
   System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +279
   System.Net.WebClient.DownloadString(Uri address) +108
   System.Net.WebClient.DownloadString(String address) +25
   Home.Read(String url) in d:\inetpub\webs\studiopascaleit\Home.aspx.cs:35
   Home.Page_Load(Object sender, EventArgs e) in d:\inetpub\webs\studiopascaleit\Home.aspx.cs:24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4667.0