What am trying is to fetch the locations using google coordinate api. The code snippet I used is as follows,
String serviceAccountEmail = "mail.gserviceaccount.com";
var certificate = new X509Certificate2(Server.MapPath("../CertStore/cert.p12"), "notasecret", X509KeyStorageFlags.Exportable);
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { CoordinateService.Scope.Coordinate }
}.FromCertificate(certificate));
// Create the service.
var service = new CoordinateService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "sample",
});
var list = service.Location.List("teamId", "workermail", 1000).Execute();
But am getting an exception as follows,
A first chance exception of type 'Google.GoogleApiException' occurred in Google.Apis.dll A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll A first chance exception of type 'System.Threading.ThreadAbortException' occurred in Google.Apis.dll Evaluation requires a thread to run temporarily. Use the Watch window to perform the evaluation.
stack trace
Source Error:
Line 395: ApplicationName = "sample",
Line 396: });
Line 397: var list = service.Location.List("teamId", "workermail", 1000).Execute();
Line 398:
Line 399:
Am doing anything wrong here?..
Thanks,
Anish.