简体   繁体   中英

Sharepoint Online ClinetContext.ExecuteQuery causes connection reset

I have an ASP.NET application hosted in IIS calling Sharepoint using ClientContext . On a production deployment, a call to ExecuteQuery causes the ASP.NET to throw net::ERR_CONNECTION_RESET . On the server, the following exception was thrown:

   at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
   at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
   at Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryToServerAsync>d__6.MoveNext()
   Cannot complete this action. Please try again.

There is no other trace of any other error, except this.

I have tried setting TLS1.2 with no success.

I have also tried using a delay before the call to ExecuteQuery and the result was still a failure.

Can anyone suggest what could be going wrong here?

Note: it works perfectly on my local machine.

After spending a few valuable hours, I found the solution. One of the fields had a wrong date time value and Sharepoint , on the flip side, without throwing a meaningful exception, just caused the request in IIS to abruptly close.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM