title: Azure WebJobs ServiceBus returns Exception: found 2 DNS claims in authorization context
body: <p>I'm trying to read a message from an Azure ServiceBus queue using an Azure WebJob but it's throwing and exception: </p>
  
  <pre><code>Unhandled Exception: System.InvalidOperationException: Found 2 DNS claims in authorization context.
  </code></pre>
  
  <p>I've set the correct connection strings named "AzureWebJobsServiceBus", "AzureWebJobsDashboard" and "AzureWebJobsStorage"</p>
  
  <p>The WebJob Program code has been updated to use JobHostConfiguration:</p>
  
  <pre><code>class Program
  {
      static void Main()
      {
          var config = new JobHostConfiguration();
          config.UseServiceBus();
  
          var host = new JobHost(config);
          host.RunAndBlock();
      }
  }
  </code></pre>
  
  <p>And the actual Job method</p>
  
  <pre><code>public class Functions
  {
      public async static Task ServiceBusResizeRequest(
           [ServiceBusTrigger("blah")] string message,             
           TextWriter log
           )
      {            
          await log.WriteLineAsync("got message " + message);
      }
  
  }
  </code></pre>
  
  <p>I can successfully create and write to the queue via a separate console application.</p>
  
  <p>But when I run the webjob application, it throws that exception.</p>
  
  <p>Any ideas?</p>
  
  <p>EDIT: Using .net 4.6.1</p>