title: Azure Function not getting messages from Storage Queue
body: <p>I have created test Azure function with queue trigger.
  When I run this function in local emulator it works. But when I deploy it on Azure, it looks like it's not working (messages are not being deleted from queue).</p>
  
  <p><strong>Function</strong></p>
  
  <pre><code>[FunctionName("Function1")]
      public static void Run([QueueTrigger("azurefunc", Connection = "StorageConnectionString")]string myQueueItem, TraceWriter log)
      {
          log.Info($"C# Queue trigger function processed: {myQueueItem}");
  
          // PERFORMANCE TEST
          for (int i = 0; i &lt; 10000; i++)
          {
              for (int j = 0; j &lt; 9000; j++)
              {
                  // Do nothing.
                  // Or do something
                  string myAwesomeTempString = "How are you";
                  myAwesomeTempString += "?";
              }
          }
  
          try
          {
              var queueMessage = new CloudQueueMessage (myQueueItem);
              QueueApi.DeleteMessage (QueueApi.AzureFunctionStorageQueue, queueMessage);
          }
          catch
          {
  
          }
      }
  </code></pre>
  
  <p><strong>local.settings.json</strong></p>
  
  <pre><code>{"IsEncrypted": false,
    "Values": {
      "AzureWebJobsStorage": "AZURE_STORAGE_CONNECTION_STRING",
      "AzureWebJobsDashboard": "AZURE_STORAGE_CONNECTION_STRING",
      "StorageConnectionString": "AZURE_STORAGE_CONNECTION_STRING",
      "serviceBusAccount": "SERVICE_BUS_CONNECTION_STRING"
    }}
  </code></pre>
  
  <p><strong>Part of QueueApi</strong></p>
  
  <pre><code>/// &lt;summary&gt;
      /// Creates instance of Queue Storage
      /// &lt;/summary&gt;
      /// &lt;param name="queueName"&gt;Name of queue storage&lt;/param&gt;
      /// &lt;returns&gt;The instance of queue storage&lt;/returns&gt;
      private static CloudQueue CreateStorageQueue (string queueName)
      {
          CloudStorageAccount storageAccount = CloudStorageAccount.Parse ("AZURE_STORAGE_CONNECTION_STRING");
          CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient ();
          CloudQueue queue = queueClient.GetQueueReference (queueName);
          queue.CreateIfNotExists ();
          return queue;
      }
  
      /// &lt;summary&gt;
      /// Deletes message from queue.
      /// &lt;/summary&gt;
      /// &lt;param name="queue"&gt;The queue storage instance&lt;/param&gt;
      /// &lt;param name="message"&gt;Message to be deleted&lt;/param&gt;
      public static void DeleteMessage (CloudQueue queue, CloudQueueMessage message)
      {
          CheckInstances ();
  
          if (message != null)
          {
              queue.DeleteMessage (message);
          }
      }
  </code></pre>
  
  <p>I created <em>Azure Service Bus</em> account just to test another approach, but I would really rather use <em>Azure Storage Queue</em>.</p>
  
  <p>Can anyone please help me?</p>
  
  <p>Thank you very much</p>