Help needed with failed to connect error

Nov 12, 2008 at 9:29 AM

I've been running a facebook application in development for a few months now and it has been working fine until I transfferred to a hosting company. Now I'm getting the following error:
> Message: Failed to get Facebook and User session
> DetailsSystem.Net.WebException: Unable to connect to the remote
> ---> System.Net.Sockets.SocketException: A connection attempt failed
> because the connected party did not properly respond after a period
> time, or established connection failed because connected host has
> to respond
> > at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
> SocketAddress socketAddress)
> > at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
> > at System.Net.ServicePoint.ConnectSocketInternal(Boolean
> connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
> address, ConnectSocketState state, IAsyncResult asyncResult, Int32
> timeout, Exception& exception)
> > --- End of inner exception stack trace ---
> > at System.Net.HttpWebRequest.GetRequestStream()
> > at Facebook.API.FacebookAPI.GetQueryResponse(String requestUrl,
> String postString)
> > at Facebook.API.FacebookAPI.ExecuteApiCallString(IDictionary`2
> parameterDictionary, Boolean useSession)
> > at Facebook.API.FacebookAPI.GetUserInfoXml(String userIds)
> > at Facebook.API.FacebookAPI.GetUserInfo(String userIds)
> > at Facebook.Components.FacebookService.GetUserInfo(String userIds)
> > at _Default.Page_Load(Object sender, EventArgs e)
> > ------------------------------
The code hasn't changed and the hosting company have been useless. Can anyone shed some light?


Nov 12, 2008 at 2:57 PM
Could be a few different things, but from what you've said so far, I think there's a good chance that your hosting provider is blocking your outbound calls to Facebook's API server ( If you have command line access on the server at all, you might just try pinging the Facebook server ("ping") from there and see if you get anything back. If not, your provider is almost definitely blocking access. If you do get something back, they might still be blocking it, but only on certain ports or something.

Keep talking to the hosting provider and see if you can get any answers, or maybe Google for other people that have used Facebook with that provider. If all else fails, you can always just switch to someone else. I believe some people here have had luck with GoDaddy, but I'm sure there are others as well.