0

Error log :

InnerException:System.InvalidOperationException: Error reading credential file from location OCR-c812724b.json: Could not find file 'C:\Windows\SysWOW64\inetsrv\OCR-c812724b.json'. Please check the value of the Environment Variable GOOGLE_APPLICATION_CREDENTIALS at Google.Apis.Auth.OAuth2.DefaultCredentialProvider.d__11.MoveNext()

Below is my .cs Code

Response.Write("<BR>GCLOUD_PROJECT:" + 
Environment.GetEnvironmentVariable("GCLOUD_PROJECT"));
Response.Write("<BR>GOOGLE_APPLICATION_CREDENTIALS:" + 
Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS"));
string[] delimiters = new string[] { "\n" };

var credential = GoogleCredential.GetApplicationDefault(); <-- Error here
Response.Write("<BR>Test for credentials" + credential);

Does anybody have as solution?

Prathamesh
  • 21
  • 5

0 Answers0