views:

246

answers:

2

I've got an ASP.NET web application and a .NET webservice which is used by the web application. These applications are hosted on a remote server I don't have remote shell access to. When the web application invokes the web method in the webservice, I get the following error message:

A connection attempt failed because the connected party did not
properly respond after a period of time, or established connection failed
because connected host has failed to respond Server_IP_Address:80

The strange thing is I don't always get this error. It works intermittently, and it works if I visit the website through vTunnel (a proxy).

It also works if I test the website from Visual Studio 2008 by calling the web method on the remote server.

The remote server is a Windows Server 2008 instance using IIS 7. The web application and webservice are written in .NET 3.5.

A: 

It sounds like it could be a resouces issue on the hosted server - is it a virtual machine or shared hosting solution? it could be that you are being throttled by the hosting provider in terms of CPU or memory that could mean the web service is taking too long to respond.

When you run your tests are you using the same data ie is the work the web service is doing the same?

I would initially pursue this with your hosting provider I don't think on the face of it you are doing anything wrong

Rich

Richard
Hi Rich,Thank you for your update. It is NOT a virtual machine, it is a shared hosting solution. When I did the test, my local web site application has a web reference which is the web service on the remote server. So the web service is doing the same thing all the time. I rang the hosting provider a few times, but they can not give me a reasonable answer.Thanks again.
Xiaosu
A: 

Hi Xiaosu, I have experienced similar issues with shared hosting - I believe the IIS process gets restarted intermittently which causes this - if you can cath an exception and print out a stack trace somewhere it might help identify the exact reason o you can argue with the provider.

MSIL
Hi, thank you for your update. if IIS process gets restarted intermittently, why it does not connect to the web service application? I do catch that exception, but there is not too much useful info in the stack trace. I am not quite sure if I change the service provider, the problem will be solved. Thanks
Xiaosu