Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure WebJobs Connection Strings configuration ( AzureWebJobsDashboard?? )

I'm trying to work with Azure Webjobs, I understand the way its works but I don't understand why I need to use two connection strings, one is for the queue for holding the messages but

  1. why there is another one called "AzureWebJobsDashboard" ?

  2. What its purpose?

  3. And where I get this connection string from ?

At the moment I have one Web App and one Webjob at the same solution, I'm experiment only locally ( without publishing anything ), the one thing I got up in the cloud is the Storage account that holds the queue.

I even try to put the same connection string in both places ( AzureWebJobsDashboard,AzureWebJobsStorage) but its throw exception : "Cannot bind parameter 'log' when using this trigger."

Thank you.

like image 998
Ron Avatar asked Feb 03 '15 19:02

Ron


People also ask

What is the azurewebjobsdashboard connection string?

Show activity on this post. The AzureWebJobsDashboard connection string is your Azure Storage Account used by the Azure SDK to store logs used by the WebJobs dashboard.

What is the azurewebjobsstorage connection string?

The AzureWebJobsStorage connection string is your Azure Storage Account that is used to by the SDK to do things like trigger when a file is uploaded to blob storage or a message is added to a queue.

How do I access the Azure webjobs runtime logs from my website?

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.

Which connection string needs to be specified for Azure web services?

The connection string that needs to be specified is the connection string to an Azure Storage account. The format is as follows: DefaultEndpointsProtocol=https;AccountName= [Storage Account Name];AccountKey= [Access Key] The other connection string that has to be provided is for the AzureWebJobsServiceBus. Format is:


2 Answers

There are two connection strings because the WebJobs SDK writes some logs in the storage account. It gives you the possibility of having one storage account just for data (AzureWebJobsStorage) and the another one for logs (AzureWebJobsDashboard). They can be the same. Also, you need two of them because you can have multiple job hosts using different data accounts but sending logs to the same dashboard.

The error you are getting is not related to the connection strings but to one of the functions in your code. One of them has a log parameter that is not of the right type. Can you share the code?

like image 166
Victor Hurdugaci Avatar answered Sep 24 '22 08:09

Victor Hurdugaci


Okay, anyone coming here looking for an actual answer of "where do I get the ConnectionString from"... here you go.

On the new Azure portal, you should have a Storage Account resource; mine starts with "portalvhds" followed by a bunch of alphanumerics. Click that so see a resource Dashboard on the right, followed immediately by a Settings window. Look for the Keys submenu under General -- click that. The whole connection string is there (actually there are two, Primary and Secondary; I don't currently understand the difference, but let's go with Primary, shall we?).

Copy and paste that in your App.config file on the connectionString attribute of the AzureWebJobsDashboard and AzureWebJobsStorage items. This presumes for your environment you only have one Storage Account, and so you want that same storage to be used for data and logs.

I tried this, and at least the WebJob ran without throwing an error.

like image 30
RayHAz Avatar answered Sep 22 '22 08:09

RayHAz