0

I am currently deploying a C# console app as a Continuous Azure Web Job to an Azure App Service and I am using the Azure Web Jobs SDK 3.X(https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to).

The Web Job successfully deploys to the Azure App Service but the status of the Web Job is "Pending Restart". When I check the logs, the error I see is that a configuration value is being read in as NULL. I am setting this value in the App Service's configuration/Application Settings page but it seems my Web Job is unable to read it. Do these settings need to be set during deploy? Or do I need to be setting these configuration values in a different location?

tsofronis
  • 1
  • 1
  • are you reading using Environment.GetEnvironmentVariable? – Thiago Custodio Aug 09 '22 at 21:08
  • Yes. I believe I actually resolved it. My issue was that my app thought that my environment was Develop and it was looking for the appsettings.Development.json file. Once I corrected that issue, it looks like I am reading in my app settings correctly. – tsofronis Aug 09 '22 at 22:07
  • hey, could you please post this as an answer so that would be helpful for other community members who are facing the same issue. – RKM Aug 10 '22 at 06:27

1 Answers1

0

My issue was that my app thought that my environment was Develop and it was looking for the appsettings.Development.json file. Once I corrected that issue, it looks like I am reading in my app settings correctly.

tsofronis
  • 1
  • 1