I have an empty iPhone Window-based Project created with MonoDevelop.
In the generated code, in the FinishedLaunching method I try to connect to
the Twitter API using the following code:

        string url = "http://twitter.com/statuses/friends_timeline.xml";;
        WebRequest request = WebRequest.Create(url);
        request.Method = WebRequestMethods.Http.Get;
        request.PreAuthenticate = true;
        request.Credentials = new NetworkCredential("*******", "*******");
        WebResponse response = request.GetResponse();

My username and password are correct Twitter credentials. I tried it out
using HttpWebRequest and HttpWebResponse, but I constantly get the following

Unhandled Exception: System.Net.WebException: Error: ConnectFailure
(Connection refused) ---> System.Net.Sockets.SocketException: Connection
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP)
[0x00159] in
  at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request)
[0x001ba] in

If I try to connect to any other url, for example: http://google.com,
specifying DefaultCredentials, or without using any credentials, I get the
same error too. 

Can you help me please?

View this message in context: 
Sent from the MonoTouch mailing list archive at Nabble.com.
MonoTouch mailing list

Reply via email to