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.
- 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.
- What could be the possible connection between above two errors ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With