web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

System.Net.Sockets.SocketException: Overlapped I/O operation is in progress

(0) ShareShare
ReportReport
Posted on by 150

Hi,

I got this exception (only 3 times when creating 162 records) in my Plugin, triggered by an Action. So the Plugin was successful 159 times.

System.ServiceModel.CommunicationException: A TCP error (997: Overlapped I/O operation is in progress) occurred while transmitting data. ---> System.Net.Sockets.SocketException: Overlapped I/O operation is in progress
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
   --- End of inner exception stack trace ---

This is the line of code that was failing 3 times out of 162:

Entity entity = service.Retrieve(context.PrimaryEntityName, context.PrimaryEntityId, new ColumnSet(true));

How can I handle this type of exception?

Is it possible to rerun the Plugin?

Regards

Kjetil

*This post is locked for comments

I have the same question (0)
  • ashlega Profile Picture
    34,477 on at

    Hi,

     you might try adding try-catch and run the same code again, but I'm not sure that would really work..

     Also, I am wondering it this would help:

    blogs.msdn.microsoft.com/.../error-997-overlapped-io-operation-is-in-progress-kb2918614-breaks-windows-installer-service

     There is a hotfix mentioned there

  • Kjetil Dahl Knutsen Profile Picture
    150 on at

    Hi,

    This Dynamics Online, I'm not able to run any hotfixes on the server.

    I already have a try-catch... but my question is if its possible for "send" the Run Plugin System Job back in queue due to this exception?

    Regards

    Kjetil

  • mwm Profile Picture
    58 on at

    Don't suppose you ever got to the bottom of this one, Kjetil?

    A synchronous plug-in that had been running well for months suddenly started giving intermittent errors along the same lines as yours - 

    Overlapped I/O event is not in a signaled state

    - on the 16th or 17th of December.  It's been having good days and bad days since.

    This is in at least a couple of different Dynamics 365 Online environments (both 8.2.something, if I recall).

    The plug-in was using an HttpClient and a PostAsync call to post an individual request to an Azure server running our own MVC web-app.  I've tried plenty of tweaking and optimising of the request-sending code but nothing has made any difference.   

    (I haven't gone as far as trying to use the old WebClient, which I think would let me do it synchronously (but mangled the request data a bit, if I recall correctly) - so I'm still stuck with using .Result at the moment).

    Google yields almost nothing, other than telling me "overlapped" means "asynchronous".

    As far as I can tell something's killing the connection.  I ran failed request tracing at the IIS server end and it says the (CRM) client is force-closing the connection.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans