Thank.
This issue can lead to my windows service working for about 20 days, stop 
working (invalid cookie), then working again when I stop and start it again?

Marco.

Il giorno lunedì 23 aprile 2012 21:06:28 UTC+2, Minh Le ha scritto:
>
> I've got this error in 3 days since April 20:
>
> System.NullReferenceException: Object reference not set to an instance of 
> an object. 
> at 
> Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.IsCookieInvalidError(AdWordsApiException
>  
> awapiException) 
> at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.ShouldRetry(Exception ex) 
> at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, 
> Object[] parameters) 
> at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.MakeApiCall(String 
> methodName, Object[] parameters) 
> at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, 
> Object[] parameters) at 
> Google.Api.Ads.AdWords.v201109.CampaignCriterionService.mutate(CampaignCriterionOperation[]
>  
> operations) 
> at SemUpdateBiz.SEMUtils.addCampaignCriteria(AdWordsUser user, Int64 
> campaignId, List`1 criteria, CampaignCriterionService 
> campaignCriterionService, googleNameAndID googleCampaign)
>
> Here is the method which is being used:
>
>  public static void addCampaignCriteria(AdWordsUser user, long campaignId, 
>                                                     
> List<CampaignCriterion> criteria, 
>                                                     
> CampaignCriterionService campaignCriterionService,
>                                                     googleNameAndID 
> googleCampaign)
>         {
>             List<CampaignCriterionOperation> operations = new 
> List<CampaignCriterionOperation>();
>
>             foreach (CampaignCriterion criterion in criteria)
>             {  
>                 CampaignCriterionOperation operation = new 
> CampaignCriterionOperation();
>                 operation.@operator = Operator.ADD;
>                 operation.operand = criterion;
>                 operations.Add(operation);
>             }
>            
>             try
>             {
>                 if (operations.Count > 0)
>                 {
>                     CampaignCriterionReturnValue retVal = 
> campaignCriterionService.mutate(operations.ToArray());
>
>                     //display added criteria
>                     if (retVal != null && retVal.value != null && 
> retVal.value.Length > 0)
>                     {
>                         foreach (CampaignCriterion temp in retVal.value)
>                         {
>                             Console.WriteLine("Campaign criterion with 
> campaign id = \"{0}\", criterion id = " +
>                                                  "\"{1}\" and type = 
> \"{2}\" was added.",
>                                                  temp.campaignId,
>                                                  temp.criterion.id,
>                                                  
> temp.criterion.CriterionType);
>                         }
>                     }
>                     else
>                     {
>                         Console.WriteLine("No campaign criteria were 
> added.");
>                     }
>                 }
>             }
>             catch (AdWordsApiException ex)
>             {
>                 // This block will be hit if there is a validation error 
> from the server.
>                 Console.WriteLine("There were validation error(s) while 
> adding campaigns.");
>
>                 if (ex.ApiException != null)
>                 {
>                     foreach (ApiError error in 
> ((ApiException)ex.ApiException).errors)
>                     {
>                         Console.WriteLine("  Error type is '{0}' and 
> fieldPath is '{1}'.",
>                             error.ApiErrorType, error.fieldPath);
>                     }
>                 }
>             }
>             catch (Exception ex)
>             {
>                 Logger.LogThis(string.Format("addCampaignCriteria() inside 
> UpdateTheseGoogleGEOTargets(): " + googleCampaign.gname + " " + 
> googleCampaign.gid + "\n" + ex.ToString(), Logger.MsgTypeEnum.Error));
>             }
>
>             operations = null;
>         }
>
>
> To generate the user:
>
>             Dictionary<string, string> headers = new Dictionary<string, 
> string>();
>             headers.Add("email", campaign_email);
>             headers.Add("password", campaign_password);
>             headers.Add("useragent", 
> ConfigurationManager.AppSettings["useragent"]);
>             headers.Add("developerToken", 
> ConfigurationManager.AppSettings["developerToken"]);
>             AdWordsUser user = new AdWordsUser(headers);
>             *user.Config.RetryCount = 3;*
>
> I use " *user.Config.RetryCount = 3;*" as the advice from Anash-API Team 
> from the beginning of this April to prevent the "
> AuthenticationError.GOOGLE_ACCOUNT_COOKIE_INVALID" error, and now I'm 
> facing the above error.
>
>
> I also got this error:
>
> System.Net.WebException: The request was aborted: *Could not create 
> SSL/TLS secure channel. *
> at 
> System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest 
> request) 
> at 
> System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest 
> request) 
> at Google.Api.Ads.Common.Lib.AdsSoapClient.GetWebResponse(WebRequest 
> request) 
> at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String 
> methodName, Object[] parameters) 
> at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, 
> Object[] parameters) 
> at Google.Api.Ads.AdWords.Lib.AdWordsSoapClient.MakeApiCall(String 
> methodName, Object[] parameters) 
> at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, 
> Object[] parameters) 
> at 
> Google.Api.Ads.AdWords.v201109.CampaignCriterionService.mutate(CampaignCriterionOperation[]
>  
> operations) 
> at addCampaignCriteria(AdWordsUser user, Int64 campaignId, 
> List<CampaignCriterion> criteria, CampaignCriterionService 
> campaignCriterionService, GoogleAccount googleAcc)
>
> Does anyone has any advice on these 2  issues?
>
> Thanks
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to