tags:

views:

32

answers:

2

Hi,

I'm using a web service in my asp.net 3.5 application.The web-service is hosted in my live server and it is working fine. My web application is also hosted in the same server.But when i try to access the webservice from my asp.net web application hosted online,I'm getting the following error.

[SocketException (0x274c): 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 xx.xx.xx.xx:80]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

I'm able to call the online webservice from my web application hosted locally on my system and it is working fine.

Thanks in advance, Naijel

A: 

That looks like TCP communication problem not WebService specific problem. Try to open browser on machine hosting ASP App and call the same webservice url you use in app. See if you get response with list of methods. It might be firewall thing.

Tomek
we have hosted the application on shared hosting server. webhosting4life
NjL
A: 

Hi, i just resolved this issue by giving the following code in web.config

<system.net>
    <defaultProxy>
      <proxy usesystemdefault="False" proxyaddress="http://127.0.0.1:80" />
    </defaultProxy>
  </system.net>

initially i tired the above code except "proxyaddress" attribute without any luck.

Thank you all for your help

NjL