So I am using Firebase SDK to send push notifications to my android clients.
On local IIS this is how I have configured FirebaseSdk. In Startup.cs I have
FirebaseApp.Create(new AppOptions()
{
Credential = GoogleCredential.GetApplicationDefault(),
});
In my web.config I have
<environmentVariables>
<environmentVariable name="GOOGLE_APPLICATION_CREDENTIALS" value="D:\credentials.json" />
<environmentVariable name="COMPLUS_ForceENC" value="1" />
</environmentVariables>
this GOOGLE_APPLICATION_CREDENTIALS is what is needed by the Firebase SDK to work.
Now coming to azure I created an environment variable by selecting App Service->Configuration-> New Application Setting
I gave it the path to the file which I had uploaded at the following link
D:\home\site\credentials.json .
I had identified this path using the kudu tool available in the portal. I also confirmed that a variable has been created with kudu by clicking on environment variables.
However I still get this error during deployment
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: One or more errors occurred. (The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.) Unable to create an object of type 'DbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Any pointers as to why is my file not being made available to the application?.