I have been searching around but can't find an answer to why this problem is popping up out of nowhere. I have a 4.5 .NET C# console application that has been running fine for over a year, but is now throwing the following error:
Exception Occurred: System.Net.WebException
: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException
: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException
: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute()
at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at Sharepoint_Audit_Automation.SharepointAudit.returnUsersfromView(String listName, String viewName, ClientContext clientContext, WebClient client, XNamespace d, String recipientField)
at Sharepoint_Audit_Automation.SharepointAudit.Main(String[] args)
The exception is being thrown when it tries to execute ClientContext.ExecuteQuery()
. Nothing on the application has changed. I am waiting for the SP server team response to see if anything has changed on their side, but does anyone here have any idea what could have caused this new problem?
I am working with SharePoint foundation REST by the way.
Thanks in advance.