Reputation: 87
I have a C# client that is consuming a SAP web service. This client is hosted on IIS and the client works by adding a web reference to the WSDL.
While sending a request, the connection times out and this happens at 63 seconds. I get a html dump in my logs saying
System.InvalidOperationException: Client found response content type of 'text/html', but expected 'text/xml'.
Application Server Error
I have no where hardcoded this timeout and can't understand why is this happening. Has anybody see such a thing before, can I get any help resolving this.
Upvotes: 1
Views: 4584
Reputation: 87
Solved the problem,
The main problem we were having was there was no live connection to SAP and we could only test production code on site and hence couldn't debug live.
On the same system as our client we ran SOAPUI and tested the connection to SAP. The same error of connection time out was thrown at about 63 to 64 seconds. Increasing the time out on SOAPUI had no effect and that proved that there was nothing wrong with our client code.
It was finally narrowed down to an Web dispatcher/load balancer that funnels all communication to SAP server and that had a time out of 60 seconds. So any response from SAP that took more than 60 seconds would be killed and the client would get a timeout error.
Increasing this timeout got rid of the problem and we could download SAP data fine.
Hope this helps somebody in the future.
Thank you
Upvotes: 3