title: The specified container does not exist (Azure)
body: <p>Code below works. But when i'm trying to delete blob from container i`m getting exception &quot;The specified container does not exist&quot;:</p>
  <pre><code>public static async Task Run([BlobTrigger(&quot;files-for-uploading/{name}&quot;, Connection = &quot;AzureWebJobsStorage&quot;)]
          Stream myBlob, string name, ILogger log)
  {
      try
      {
          var config = new ConfigurationBuilder()
              .AddJsonFile(&quot;local.settings.json&quot;, optional: true, reloadOnChange: true)
              .AddEnvironmentVariables()
              .Build();
  
          if (CloudStorageAccount.TryParse(config[&quot;AzureWebJobsStorage&quot;],
              out CloudStorageAccount storageAccount))
          {
              ClientHandler clientHandler = new ClientHandler(HttpClientFactory.Create());
              CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
              CloudBlobContainer container = 
              blobClient.GetContainerReference(config[&quot;ContainerForFileUploading&quot;]);
              DeleteFilesFromBlob(container, name, log);
          }
      }
      catch (Exception e)
      {
          throw;
      }
  }
  </code></pre>
  <p>Delete function:</p>
  <pre><code>private static void DeleteFilesFromBlob(CloudBlobContainer container, string blobName, ILogger log)
  {
      CloudBlob file = container.GetBlobReference(blobName);
      file.DeleteIfExists();
  }
  </code></pre>
  <p>And it delete works when i'm running it in Visual Studio, but does not work in azure. Very strange.</p>