System.Net.WebException: The operation has timed-out.

I have a very simple web service built with Java and deploy on Websphere server. The WS just receive a string array and return an integer value.

I have another .Net client which has to call this WS, the client is deployed on a windows 2003 based Citrix MPS server, and all users has to logon to this server in order to use the client. The MPS server and websphere server is on the same network, there is no network problem between them.

What I have spent two months to solve is that some users can call the WS through the .Net client perfectly, but some of users always fail to do that with this exception:

System.Net.WebException: The operation has timed-out.
  at System.Net.HttpWebRequest.GetRequestStream()
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
  at EDocSharp.com.group.asia.cnws01.FileIndexValidatorService.checkNewFileIndex(String documentTypeId, String[] indexValues)
  at WSValidation.checkNewFileIndex(String documentTypeId, String[] indexValues)

or

System.Net.WebException: The operation has timed-out.
  at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
  at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
  at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
  at EDocSharp.com.group.asia.cnws01.FileIndexValidatorService.checkFullIndex(String fileId, String targetStatus, String[] indexValues)
  at WSValidation.checkFullIndex(String fileId, String targetStatus, String[] indexValues)

I think the problem is somehow come from specific user session, so I tried to build a standalone webpage using Javascript to call the WS to further study the problem. However, the user encounters problem in .Net client can still call to the WS using this webpage.

So I think the problem is come from the System.Web.Services library, even I cannot read its source code and do not know it is fail in some user sessions.

Anyone has idea about the problem, or how can I investigate what's going on in the System.Web.Services library in something like debug mode to fully understand how user session / profile affect this library



Answer this question

System.Net.WebException: The operation has timed-out.

  • Krutika

    I am dealing with a problem also having a reliable connection with web services.

    What I have done is put a routine out on my web services that just replies back with a string.

    the call to web services is in a try catch so if it gets an error a message box comes up telling the user that the server is not available

    My problem is that it takes about a minute to come up with the error. If it is going to work it usually comes back in a two seconds.

    You might try the Try Catch on the users that are having a problem to see if that helps.

    Douglas



  • Scheinka

    Unfortunately connection timeouts can occur for a variety of reasons so they can be difficult to diagnose. In v2.0 you can enable network tracing, which may help. Please see the following article:

    http://msdn2.microsoft.com/en-US/library/a6sbz1dx.aspx

    thanks

    Alex



  • System.Net.WebException: The operation has timed-out.