I am having issue with an ASP.NET web application hosted one server trying to consume an web service hosted on another server. When I browse to a page consuming the web service, I get the following error:

Server was unable to process request. ---> Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Here is the IIS log entry when the the web application tries to consume the web service. (i removed all of the server specific information)

2010-12-08 21:19:57 POST /WebServices/MyWebService.asmx - 80 - HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+2.0.50727.3615) - - 500 0 0 765 675 15015

When we move the web service to the same server as the web application, even if the web service is hosted under a different domain, it will work as expected. I am also able to browse to the web service on the other server using Internet Explorer without an issue.

Both the web application and web service is using the .NET 3.5 framework and is hosted in IIS 6.0 on a Windows Server 2003 SP2.

If anyone has experienced this issue, how were you able to resolve it.


It's likely a configuration issue. You might get lucky and find a .config file in the same directory as the web service which could have a connection string that may well be pointed at localhost.

If you do find a .config file, look for the <connectionStrings> node.

  • The connection string was pointing to the wrong database server. – Michael Kniskern Dec 13 '10 at 16:06

Is it an actual timeout issue, or a config issue? If it loads very quickly on the local machine then it's probably a config issue. Any chance that the other server is enough slower than it really is a timeout?

Do you know for sure that the web service on the other server works correctly?

Try testing at least the URL to the web service from the web server itself, just using a web browser. That will confirm DNS and network connectivity and that you have access through the firewall from the one server to the other.

  • I know it is not a timeout issue because I was able to consume the web service in the web application when they were both hosted on the same server. I was also able to browse to the web service from the other server. – Michael Kniskern Dec 8 '10 at 22:12
  • To make sure I understand: Server1 works with both roles (web and web service), but if the web service is on Server2 then web on Server 1 times out. You can manually call up the web service on Server2 from Server1 in a web browser. Can you add a web site or a tool to consume it from Server2 directly so that both roles are on Server2 to confirm that the web service does indeed work on Server2? – Scott Forsyth - MVP Dec 8 '10 at 22:51
  • Yes. All of the scenarios you mentioned above are correct. – Michael Kniskern Dec 8 '10 at 23:01
  • Your new log info is helpful. That's throwing a 500 error, and it's taking 15 seconds to do so. Something isn't playing well on your Server2. See if you can reproduce by testing everything on server2 with the same parameters and settings. Also, if you can add any debugging to your web service, that will help. Adding ELMAH to your project can also let you see where the exception is occurring. Additionally, check the WCF timeout values to make sure that the various timeout values (there are a few of them) are at least 30 seconds for the connections, and much longer for the general timeout. – Scott Forsyth - MVP Dec 9 '10 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.