3
votes

I have an ASP.NET application that is trying to connect to Twitter. When I try to connect, I receive the following 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 64.202.165.130:3128]
   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.GetResponse() +5313085

Everything seems correct on my side. I am trying to determine, is this a problem with Twitter, or my application?

2
Twitter does have lots of outages but I would keep checking things on your side.Todd Smith

2 Answers

2
votes

This is a good source also:

http://support.microsoft.com/kb/318140

It worked for me, had to add the defaultProxy section to my web.config in order to get my web site to connect to a web service.

0
votes

This could be any number of things causing this, but the most likely culprits are:

  • Proxy Configuration - If you're using a proxy you have to configure the connection
  • Anti-Virus Software blocking your application

There's some information on how to configure proxies here (it's about Fiddler which is effectively a proxy): http://www.west-wind.com/weblog/posts/596348.aspx