title: Azure Function Not Triggering
body: <p>I am having trouble getting azure function to trigger via ServiceBusQueueTrigger.</p>
  
  <p>Here's what I have:</p>
  
  <p><strong>Azure function:</strong></p>
  
  <pre><code>namespace FunctionApp1
  {
      public static class Function1
      {
          [FunctionName("Function1")]
          public static void Run([ServiceBusTrigger("ngctestqueue", AccessRights.Manage, Connection = "AzureWebJobsServiceBus")]string myQueueItem, TraceWriter log)
          {
              log.Info($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
          }
      }
  }
  </code></pre>
  
  <p><strong>host.json</strong>
  {</p>
  
  <p>}</p>
  
  <p><strong>local.settings.json</strong></p>
  
  <pre><code>{
      "IsEncrypted": false,
    "Values": {
      "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=ngctest2;AccountKey=STORAGE_ACCOUNT_KEY;EndpointSuffix=core.windows.net",
      "AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;AccountName=ngctest2;AccountKey=STORAGE_ACCOUNT_KEY;EndpointSuffix=core.windows.net",
      "AzureWebJobsServiceBus": "Endpoint=sb://ngcservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SERVICE_BUS_KEY",
      "connection": "Endpoint=sb://ngcservicebus.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SERVICE_BUS_KEY"
    }
  }
  </code></pre>
  
  <p><strong>When I run the function via F5 locally, it does not get triggered even though there ARE messages in the queue that have not yet been processed.:</strong></p>
  
  <pre><code>                  %%%%%%
                   %%%%%%
              @   %%%%%%    @
            @@   %%%%%%      @@
         @@@    %%%%%%%%%%%    @@@
       @@      %%%%%%%%%%        @@
         @@         %%%%       @@
           @@      %%%       @@
             @@    %%      @@
                  %%
                  %
  
  [10/11/2017 4:51:13 PM] Host has been specialized
  Listening on http://localhost:7071/
  Hit CTRL-C to exit...
  [10/11/2017 4:51:13 PM] Reading host configuration file 'C:\Users\User1\source\r
  epos\FunctionApp1\FunctionApp1\bin\Debug\net461\host.json'
  [10/11/2017 4:51:13 PM] Host configuration file read:
  [10/11/2017 4:51:13 PM] {
  [10/11/2017 4:51:13 PM]
  [10/11/2017 4:51:13 PM] }
  [10/11/2017 4:51:14 PM] Loaded custom extension 'BotFrameworkConfiguration'
  [10/11/2017 4:51:14 PM] Loaded custom extension 'SendGridConfiguration'
  [10/11/2017 4:51:14 PM] Loaded custom extension 'EventGridExtensionConfig'
  [10/11/2017 4:51:14 PM] Generating 1 job function(s)
  [10/11/2017 4:51:14 PM] Starting Host (HostId=intelpc-1600078640, Version=1.0.11
  232.0, ProcessId=27016, Debug=False, Attempt=0)
  [10/11/2017 4:51:14 PM] Found the following functions:
  [10/11/2017 4:51:14 PM] FunctionApp1.Function1.Run
  [10/11/2017 4:51:14 PM]
  [10/11/2017 4:51:14 PM] Executing HTTP request: {
  [10/11/2017 4:51:14 PM]   "requestId": "755084c1-3501-4e99-8629-8a9a48a60776",
  [10/11/2017 4:51:14 PM]   "method": "GET",
  [10/11/2017 4:51:14 PM]   "uri": "/"
  [10/11/2017 4:51:14 PM] }
  [10/11/2017 4:51:14 PM] Executed HTTP request: {
  [10/11/2017 4:51:14 PM]   "requestId": "755084c1-3501-4e99-8629-8a9a48a60776",
  [10/11/2017 4:51:14 PM]   "method": "GET",
  [10/11/2017 4:51:14 PM]   "uri": "/",
  [10/11/2017 4:51:14 PM]   "authorizationLevel": "Anonymous"
  [10/11/2017 4:51:14 PM] }
  [10/11/2017 4:51:14 PM] Response details: {
  [10/11/2017 4:51:14 PM]   "requestId": "755084c1-3501-4e99-8629-8a9a48a60776",
  [10/11/2017 4:51:14 PM]   "status": "OK"
  [10/11/2017 4:51:14 PM] }
  [10/11/2017 4:51:14 PM] Host lock lease acquired by instance ID '000000000000000
  00000000017FED4C5'.
  Debugger listening on [::]:5858
  [10/11/2017 4:51:16 PM] Job host started
  </code></pre>
  
  <p><strong>Question:</strong> What am I doing wrong, why is this not triggering to process the messages that are in the queue?</p>
  
  <p><strong>My dev environment is as follows:</strong></p>
  
  <p>1) Windows 8.1 Pro</p>
  
  <p>2) VS2017 Community 15.3.5</p>
  
  <p>3) Azure Functions CLI 1.0.4</p>
  
  <p><strong>Additional Info</strong>
  In the portal is shows that my queue has no messages, but in Cloud Explorer it shows them. How is that possible? </p>
  
  <p><a href="https://i.stack.imgur.com/NPjT9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NPjT9.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yv4xE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yv4xE.jpg" alt="enter image description here"></a></p>
  
  <p>Any help would really be appreciated.</p>
  
  <p>Thank you.</p>