SoapHttpClientProtocol.Invoke....timeout....A LOT

  • Thread starter Thread starter katsucurry
  • Start date Start date
K

katsucurry

Hi,

I really need some help here. I've been doing a project which
involves web services. Recently, some errors are repetively bugging
me. When my web service client calls the server, the following
errors always pop out:

System.Net.WebException: the following connection is closed. Cannot
connect to the remote serverB (<=This is a rough translation
from Chinese)
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()

System.Net.WebException: timeout
at System.Net.HttpWebRequest.GetRequestStream()
at Microsoft.Web.Services.SoapWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

System.Net.WebException: timeout
at
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
at
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request)
at
Microsoft.Web.Services.WebServicesClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

And the strange thing is that these errors don't take place every
day. Sometimes it works well for the whole day, sometimes it seems
cannot reach the server whatsoever.

This is how I use the invoke method:

int RetryInterval = definition.SA_RetryInterval;
#the RetryInterval's always 5
if (RetryInterval == 0) this.Timeout = 1*1000;
else this.Timeout = RetryInterval * 10000;

object[] results = this.Invoke(definition.OperationName,
new object[] {
sXml});



Is it the my code design's wrong?
or some settings are incorrect?
or the server's simply so darn unstable?

Any suggestion would be very appreciated.

Sincere, katsucurry :?
 
Back
Top