Hi guys, I'm trying to log in to AdWords sandbox using the .NET client library and constantly getting the following error:
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 74.125.230.112:443 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(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at Google.Api.Ads.Common.Lib.AuthToken.GetToken() at Google.Api.Ads.AdWords.Lib.AdWordsServiceFactory.MakeRequestHeaders(Dictionary`2 headers) at Google.Api.Ads.AdWords.Lib.AdWordsServiceFactory.SetHeaders(Dictionary`2 headers) at Google.Api.Ads.Common.Lib.AdsUser.SetHeaders(Dictionary`2 headers) at Google.Api.Ads.Common.Lib.AdsUser..ctor(Dictionary`2 headers) at Google.Api.Ads.AdWords.Lib.AdWordsUser..ctor(Dictionary`2 headers) at AdWordsPoC.Program.Main(String[] args) in C:\Users\aminko \Documents\Visual Studio 2010\AdWords\AdWordsPoC\Program.cs:line 26 Code which I use (console application): var headers = new Dictionary<string, string> { {"useragent", "MY_COMPANY_NAME"}, { "email", "MY_EMAIL"}, { "password", "MY_PASSWORD"}, {"developerToken", "MY_EMAIL+ +EUR"}, {"clientEmail", "client_1+MY_EMAIL"}, {"AdWordsApi.Server", "https:// adwords-sandbox.google.com"} }; AdWordsUser user = new AdWordsUser(headers); That is the very first call I try to make to AdWords server. I have created MCC/AdWords account which I'm using in email/password headers. According to exception, code tries to log in to https://google.com (IP 74.125.230.112), not to the AdWordsApi server which I specified. So I suppose that it tries to authenticate me first. It also did work if I specify headers in the app.config. What am I doing wrong? Thank you in advance, Anton Minko -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en