Error in Azure WebJobs

后端 未结 3 1465
生来不讨喜
生来不讨喜 2020-12-21 16:38

I have created a console app and managed to upload it to the cloud, and I have scheduled it to run every 15 minutes. The console app runs for the first time with success as

相关标签:
3条回答
  • 2020-12-21 16:42

    To clarify a couple of possible gotchas (adding to the accepted answer):

    Set these values by going to

    App Services -> Your Web App -> Settings / "All Settings" -> Application Settings -> (In page under header) Connection strings
    

    There you'll find Name, Value, and a Type drop down.

    Name: Do NOT put your storage account name here! Rather, this is where you put AzureWebJobsDashboard for one connection string and on the next AzureWebJobsStorage. The value for these should look like:

    DefaultEndpointsProtocol=https;AccountName=<mysupercoolblobstorageaccountname>;AccountKey=<blahblah==>
    

    -- Old Portal -- I've had problems with this before where it was fixed in the old portal, so for that sake:

    Old Portal: Your website -> Configure tab -> under 'connection strings', enter two new values: a) dropdown type CUSTOM, for NAME do NOT enter the name of your storage account! rather Name is: 'AzureWebJobsDashboard' or for the other (enter two entries): 'AzureWebJobsStorage'.

    0 讨论(0)
  • 2020-12-21 16:43

    Web Job is not able to figure out the connectionString value in appsettings.json file. There could be two scenario:

    1. If you are using an emulator, try adding this in your appsettings.json file
    {
       "ConnectionStrings": {
          "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
          "AzureWebJobsStorage": "UseDevelopmentStorage=true"
        }
    }
    
    1. If you are trying to connect directly to your Azure portal
    {
       "ConnectionStrings": {
           "AzureWebJobsDashboard": "url",
           "AzureWebJobsStorage": "url"
        }
     }
    
    0 讨论(0)
  • 2020-12-21 17:01

    You need to set AzureJobsRuntime as a connection string (for an Azure storage account), you can do that on the Azure portal under: Websites --> Your Website --> CONFIGURE tab --> connection strings.

    0 讨论(0)
提交回复
热议问题