System.Net.WebException: The remote name could not be resolved 'api.facebook.com'

Nov 17, 2008 at 12:00 PM
Hi, i'm trying to create a console application to download an entire album from facebook,
but when i call ConnectToFacebook() it throws an exception saying:
System.Net.WebException: The remote name could not be resolved 'api.facebook.com'
   in System.Net.HttpWebRequest.GetRequestStream()
   in facebook.API.postRequest(String requestUrl, String postString)
   in facebook.API.SendRequest(IDictionary`2 parameterDictionary, Boolean useSes
sion)
   in facebook.auth.createToken()
   in facebook.API.SetAuthenticationToken()
   in facebook.API.ConnectToFacebook()
   in Facebook_Album_Downloader_1._0.Program.Main(String[] args) in C:\Documents.....
with Status Code = NameResolutionFailure Does someone know why? This is the code:
            API fb = new API();
            fb.ApplicationKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
            fb.Secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
            fb.ConnectToFacebook(); //<--- WebException
It happens also with a normal Windows Forms Application.... Thank you ^^
Sep 3, 2009 at 3:59 PM

Hello

where you ever able to come up with a solution? I am having the same issue but in a mobile device app.

Thanks.

Nov 11, 2009 at 10:06 PM

Are you behind a Proxy ? If so you may need to install something like an ISA firewall client.

Nov 12, 2009 at 12:20 PM

IM not behind a firewall and I had the same issue, as i said though, only with a mobile device app.