locked
A connection attempt failed because the connected party did not properly respond after a period of time

    Question

  • hello
    i am getting this error because i am trying to access web service through proxy object by add web reference.


    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

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [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 94.229.161.83: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
    
    [WebException: Unable to connect to the remote server]
       System.Net.HttpWebRequest.GetRequestStream() +5322142
       proxypage.wstest.Page_Load(Object sender, EventArgs e) +301
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    • Moved by Bill.Wang Thursday, June 25, 2009 8:25 AM Move to the correct forum. (From:Visual Studio Team System - Web and Load Testing)
    Thursday, June 18, 2009 12:09 PM

Answers

  • When I said "on the client", I meant "in the client program". It's quite possible there's something wrong with your computer or network hardware or software.
    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Wednesday, July 01, 2009 1:03 AM

All replies

  • Hello,

    For questions related to web service,you can post on the ASMX Web Services and XML Serialization forum.
    And you may get better and quicker response there.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Monday, June 22, 2009 2:33 AM
  • Actually, this message means what it says: whoever you tried to connect to, didn't answer. Make sure the URL you are using is correct, and that the service you're connecting to is up and running.

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Thursday, June 25, 2009 5:17 PM
  • hello

    thanks for your reply

    web service is up and running i have tested it on other subdomains. it could be across domain issue.but web services are made to be accessible from cross domains. i dont what to do but i can give WCF a go one of my mates told me WCFs are easy to access from client side.

    what i am trying to do is to load another websites page into client body <div> i have tried xmlhttp request so far could get through because of cross domain issues.

    regards

    Thursday, June 25, 2009 6:43 PM
  • Looking at the stack trace, it doesn't look like you're calling a web service through a proxy class. It looks like you're calling HttpWebRequest.GetRequestStream from Page_Load.

    If this is not a web service question, then you should ask at http://forums.asp.net. All ASP.NET questions should be asked there.


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Friday, June 26, 2009 1:06 AM
  • 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

    Description:
    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: 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

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [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 94.229.161.83: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
    
    [WebException: Unable to connect to the remote server]
       System.Net.HttpWebRequest.GetRequestStream() +5322142
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +103
       uclocalUK.uclocalLinkXchangeBusinessDirectory.Exchange_GetBody(String UID, String CID, String C, String V1, String v2, String uDomain, String uPage, String uQS, String metaType) +170
       clientpage.Page_Load(Object sender, EventArgs e) +66
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    

    Friday, June 26, 2009 2:11 PM
  • Ok, this is a totally different stack trace. Are you sure this is the real one?

    This means that the server machine is listening on the port you tried to connect to, but did not respond to open the connection in time. Perhaps the service is too busy.

    This looks like a server-side issue. Why is the server taking so long to connect? Does it have too many connections already open? Maybe the operations on this service take a long time? As long as the service is handling a request, it is taking up a worker thread that could have been used to handle another request. If you have too many requests all waiting for something to happen (for a database to return data, for instance), then connections will begin to time out.

    They would time out just like yours does.

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Friday, June 26, 2009 3:43 PM
  • thanks for your reply
    both traces are correct.which means doesnt matter if i use a proxy object by adding web reference or httpwebrequest to access the web service

    errors are the same.server does not have too many connections yea it takes too long to connect. i think its client side problem because i have tried to add  web service references from other websites.i still get the same error.if it was from this server side,the client should be able to access other servers while adding web references. so thats y i think its client side.
    regards  
    Friday, June 26, 2009 4:05 PM
  • If the client accesses the service two separate and independent ways, and gets the exact same result, then the problem cannot be on the client.

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Saturday, June 27, 2009 12:09 AM
  • hi
    thanks for your reply

    if the problem cannot be on the client then why do i get the same error while accessing other web services for example http://www.webservicex.net.

    Tuesday, June 30, 2009 9:11 AM
  • When I said "on the client", I meant "in the client program". It's quite possible there's something wrong with your computer or network hardware or software.
    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of old ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Wednesday, July 01, 2009 1:03 AM
  • I know this is an old thread. I have the same problem , how did you resolve it?
    Monday, April 19, 2010 12:07 AM
  • Hi,

    I also have same problem, Pleas elet me know if got solution.

    Thanks.

     

    Wednesday, May 19, 2010 12:29 PM
  • You almost certainly do not have the same problem. This is a very general error that basically means, "I tried to connect but could not connect". The cause could be anything at all. Please start a new thread and provide the details of your problem.

     


    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Wednesday, May 19, 2010 6:04 PM
  • Are you using http o https to conect your app with the web service?

    That was my problem.

    The web service listening on 443 port and not on 80, so I should use https and not http like I was.

    See your error message...

    Hope help

    Regards

     

    Wednesday, June 29, 2011 5:37 PM
  • I am facing following issue while running load testing (Getting bulk errors):

    Error Summary:

    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 

    Due to above error, My internet is also 'disconnected' & i have to restart my machine to connect internet. 

    My internet download speed is : 10 mbps

    Pls. reply as soon as possible.

    Regards,

    Himanshu


    Himanshu Mehta

    Thursday, October 25, 2012 5:42 AM
  • This is just a generic "timeout" error. The fact that your internet gets "disconnected" may point to the reason for the timeout - you have no connectivity.

    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects

    Thursday, October 25, 2012 8:31 PM