cancel
Showing results for 
Search instead for 
Did you mean: 

Sample AIM VB.Net code failing -- error message "A connection attempt failed"

All -- I do not seem to be able to get ANY of the sample code working against the test or live systems, and am confused what the problem may be. (Note -- very new to web developing).

 

Specific error message with VB.NET sample code (changed API login id & transaction key):

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 64.94.118.33:443

 

[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 64.94.118.33:443]
   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(TransportContext& context) +1872977
   System.Net.HttpWebRequest.GetRequestStream() +13
   races2run_test_auth.Button1_Click(Object sender, EventArgs e) +840
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


 

I saw somewhere in the forum that someone had a similar issue and that it might be SSL related.  My SSL seems ok if you go to https://sitename.com, but if you go to www.sitename.com, you will get a SSL warning.  Could this be the issue?

Mike_reph
Member
11 REPLIES 11

THAT WAS IT!!!! Raynor YOU ROCK!!!

So, the solution to my problem is:

 

change the web.config file to add the proxy server for 1and1.com

 

<system.net>

      <defaultProxy>
        <proxy usesystemdefault="False"
        bypassonlocal="False"
        proxyaddress="http://ntproxy.1and1.com:3128"
/>
      </defaultProxy>

</system.net>

 

Thank you to Raynor for the research and finding the solution.