I have the most simple example of the webjobs SDK, that is supposed to trigger when a new file is put on an input blob container and copy it to another one.
Below are the code and the App.config, with the account name and key redacted to XXX intentionally.
The problem is that when I run this locally, I get the exception below.
System.InvalidOperationException was unhandled HResult=-2146233079 Message=Microsoft Azure WebJobs SDK Dashboard connection string is missing or empty.
I have already tried:
- Creating a JobHostConfiguration variable and setting the connection string there. I get the same error.
- Publishing this to an actual Azure WebJob, and put the connection string in the Azure Portal website configuration, I get the exact same error in the Job logs. Note that the job mode was set to Continuous and the AlwaysOn option was set on the webapp.
- Putting the connection information in an appSetting entry instead of in connectionStrings. Saw it on a blog post somewhere, still did not work.
- Using UseDevelopmentStorage in the connection string, but it complains that the Azure Storage Emulator is not supported.
I just installed the latest version of the SDK today (2.9, I believe?). This is a new machine and I'm just learning Azure and WebJobs, so it's not like I've gotten a lot of complex scenarios working on this machine before.
At this point, I'm at a loss. Any help is greatly appreciated, thank you.
Code:
using Microsoft.Azure.WebJobs;
using System.IO;
namespace TestWebJob1
{
class Program
{
static void Main(string[] args)
{
JobHost host = new JobHost();
host.RunAndBlock();
}
public static void CopyCopy([BlobTrigger("testinput/{name}")] TextReader input, [Blob("testoutput/{name}")] out string output)
{
output = input.ReadToEnd();
}
}
}
App.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<connectionStrings>
<add name="AzureWebJobsDashboard" connectionString="DefaultEndpointsProtocol=https;AccountName=XXXX;AccountKey=XXX" />
</connectionStrings>
</configuration>