Intermittent "Server execution failed" error while calling BOI from C# web service

I wrote a C#/ASP.NET web service for a client to import inventory and purchase order data. With one particular method of this web service, the client is seeing intermittent errors. According to the log file I received, the calling application makes a few successful calls (around 3 to 20), then there are 1 to 3 failures. I see two types of errors in the log:

  • System.ServiceModel.FaultException: Server was unable to process request. ---> Retrieving the COM class factory for component with CLSID {60503AB4-2D27-11D6-B249-00C04F50D575} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
  • The other is a timeout error between the calling application and the web service. This may or may not have anything to do with BOI. The error message doesn't mention any Sage 100 component.


I'm trying to determine why the BOI calls work sometimes, but not others. In reviewing the log file today, I noticed a timing pattern. The pattern isn't 100% consistent, but here are the details:

  • A web service call is more likely to succeed if it occurs within about 5 seconds of the previous call.
  • A web service call is more likely to fail if it occurs about 30 seconds or longer after the previous call.


My web service methods create a new instance of ProvideX.Script and a new session object every time an external application calls them. If 20 applications were to call my web service methods at exactly the same time, the server would have 20 ProvideX.Script objects and 20 sessions in memory.

I insisted that the web service be installed on IIS on the Sage 100 server itself. I was hoping to avoid some DCOM complications.

Any tips on getting this "Server execution failed" error to go away? I already submitted a support case to Sage, but I don't hold out much hope of getting an answer there.

  • 0
    My first thought is user licenses. Every connection should use a license - so your methodology might work better with a queue and management of active sessions instead of parallel processing.

    Could it be that you are re-using some of those sessions and they are not really getting disposed? Are you counting on the .net garbage collection or are you explicitly handling your memory? That might explain why in 5 seconds (if your memory hasn't been collected and you actually are referencing the same memory location) the call may work... might being the key word there. 30 seconds or longer? any licenses available at that time? Or are connections still sitting there waiting for the garbage collection? again that "might" explain it...

    hard to say without seeing your code in more detail, these suggestions are just brain-storms really...