question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setting DashboardConnectionString in JobHostConfiguration, but still seeing missing AzureWebJobsDashboard warning in xxx.scm.azurewebsites.net

See original GitHub issue

issue

I am creating a continues webjob and want to see each function call from the dashboard(from https://xxx.scm.azurewebsites.net/azurejobs/#/jobs/continuous/xxx). I understand that I need to set the AzureWebJobsDashboard on portal as connection string.

I also believe that this could be set in the code throught DashboardConnectionString in JobHostConfiguration class. After doing that I can see azure-jobs-host-output and azure-webjobs-hosts in the storage account, but I am still seeing the missing AzureWebJobsDashboard warning on xxx.scm.azurewebsites.net, not be able to see each triggered function call log. I am sure that the connection string value is same when I set in as AzureWebJobsDashboard on portal config.

The reason I want to configure this in code is that we store webjobDashboardConnectionString and webjobStorageConnectionString in key vault and want to rotate them. And I don’t want to maintain a app.config, so I don’t have connection string field in app.config.

here is the code that shows how I implement this. Am I missing something here? Since I searched around and didn’t see anyone else asking this.

var config = new JobHostConfiguration();
config.DashboardConnectionString = webjobDashboardConnectionString;
config.StorageConnectionString = webjobStorageConnectionString;

ServiceBusConfiguration serviceBusConfig = new ServiceBusConfiguration
{
    ConnectionString = serviceBusConnectionString
};
config.UseServiceBus(serviceBusConfig);
config.NameResolver = new ServiceBusQueueNameResolver();

var host = new JobHost(config);
host.RunAndBlock();

a potential workaround

I know that connection strings and application settings are environment variables for webjob, and I do print them by

Console.WriteLine("getting dashboard env var: {0}", Environment.GetEnvironmentVariable("CUSTOMCONNSTR_AzureWebJobsDashboard"));

Can I set the environment variable directly? I haven’t try this out but just thought about this.

version

Microsoft.Azure.WebJobs, Version=2.2.0.0 Microsoft.Azure.WebJobs.Host, Version=2.2.0.0 Microsoft.Azure.WebJobs.ServiceBus, Version=2.2.0.0

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

1reaction
pvonescommented, Feb 17, 2020

It still doesn’t work. Setting the config.DashboardConnectionString value has no effect on the Kudu dashboard. Is there any QA out there or we are the first few people who have ever used this setting?

There is another report https://stackoverflow.com/a/51217978

1reaction
leiwen0614commented, Jan 25, 2019

Is there any update on this? or this might be a SDK version issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting exception Azure WebJobs SDK ...
I have already tried: Creating a JobHostConfiguration variable and setting the connection string there. I get the same error.
Read more >
azure web jobs dashboard is not working when configuring ...
In your Microsoft Azure Website configuration you must set a connection string named AzureWebJobsDashboard by using the following format ...
Read more >
Solution to "can't be invoked from Azure WebJobs SDK. Is it ...
can't be invoked from Azure WebJobs SDK. Is it missing Azure WebJobs SDK attributes? I got this error when I was creating an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found