Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i execute Azure webjobs without AzureWebJobsStorage connectionstring?

When i create new Azure webjob project i could see the connectionstring section in app.config section as below:

<connectionStrings>
    <!-- The format of the connection string is "DefaultEndpointsProtocol=https;AccountName=NAME;AccountKey=KEY" -->
    <!-- For local execution, the value can be set either in this config file or through environment variables -->
    <add name="AzureWebJobsDashboard" connectionString="" />
    <add name="AzureWebJobsStorage" connectionString="" />
  </connectionStrings>

IN my webjob Functions im interacting only with my application db.

  1. So Do i really need to create two more databases for azure webjobs ?

When i run webjobs from visual studio i'm getting the below error:

Application: WebJobTest.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at Microsoft.Azure.WebJobs.JobHost.Call(System.Reflection.MethodInfo, System.Object) at WebJobTest.Program.Main()

And when i try access webjobs log it shows: WebJob Details WebJobTest

Make sure that you are setting a connection string named AzureWebJobsDashboard in your Microsoft Azure Website configuration by using the following format DefaultEndpointsProtocol=https;AccountName=NAME;AccountKey=KEY pointing to the Microsoft Azure Storage account where the Microsoft Azure WebJobs Runtime logs are stored.

I guess this is because of not having proper database connection string.

  1. What could be the possible connection between above two errors ?
like image 931
ManirajSS Avatar asked Nov 23 '15 15:11

ManirajSS


1 Answers

The AzureWebJobsDashboard connection string is optional - you only need it if you want to be able to use the Dashboard UI for logs, etc.

The AzureWebJobsStorage connection string IS required - while you might not be using any storage entities, the WebJobs runtime does use some blobs and other storage entities for its own tracking and operation.

like image 84
mathewc Avatar answered Sep 20 '22 22:09

mathewc