asp.net mvc - Google API Client Library freezing up in IIS when making request -
i have been using google api client library .net loading google analytics data application:
recently though have found have started freezing completely. execute()
command makes connection google server.
it makes successful request :
https://accounts.google.com/o/oauth2/token
which returns :
{ "access_token" : "ya30.haklqsgzo2gnk5wxlxx9tltquyd9xkt7azxuqndy-khjucyrctn_xhip", "token_type" : "bearer", "expires_in" : 3600 }
but never returns execute
call.
the same code in console app returns immediately, in iis never returning.
in previous version worked fine (i'm not sure version changed).
i have load user profile
set true.
what causing this?
var service_account_pkcs12_file_path = @"c:\temp\googleanalytics-privatekey.p12"; x509certificate2 certificate = new x509certificate2(service_account_pkcs12_file_path, "notasecret", x509keystorageflags.machinekeyset | x509keystorageflags.persistkeyset | x509keystorageflags.exportable); // create credentials (not real login here) serviceaccountcredential credential = new serviceaccountcredential( new serviceaccountcredential.initializer("86987278011-ctegcus4og7kn6oigkrv8po5pf67bbgj@developer.gserviceaccount.com") { scopes = new[] { analyticsservice.scope.analyticsreadonly } }.fromcertificate(certificate)); // create service var service = new analyticsservice(new baseclientservice.initializer() { httpclientinitializer = credential, applicationname = "google analytics application", }); // accounts accounts = service.management.accounts.list(); var items = accounts.execute();
as explained in google calendar api - not returning execute() c#, have bug in latest version of google.apis.auth v 1.9.3.
we have fix it, in our repository (https://github.com/google/google-api-dotnet-client), can test analytics api (https://developers.google.com/resources/api-libraries/download/analytics/v3/csharp).
a new release of library planned in next few weeks stay tuned - http://google-api-dotnet-client.blogspot.com/
update (dec 15th): new nuget packages 1.10.0 available, read more at: http://google-api-dotnet-client.blogspot.com/2015/12/announcing-release-of-1100.html
Comments
Post a Comment