7

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 ?
2
  • Using azure storage for logs should not be required. I have web jobs that don't do that. Commented Nov 23, 2015 at 15:18
  • Both connection strings not required ? @MattfromStackify Commented Nov 23, 2015 at 15:24

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

2 Comments

can i use same AzureWebJobsStorage connectionstring for two webjobs?
Yes, you can use the same connection string for as many WebJobs as you want.
6

Adding to Mathew's answer, AzureWebJobsStorage is only required when using the WebJobs SDK, to use Azure WebJobs you don't have to use WebJobs SDK so you don't have to have AzureWebJobsStorage connection string.

3 Comments

So both connection strings not required ?Can i ignore both connection strings ? @Amit Apple
can i use same AzureWebJobsStorage connectionstring for two webjobs?
Yes, this is the default scenario

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.