title: The specified resource name length is not within the permissible limits Azure Blob Storage
body: <p>I am getting an error as "The specified resource name length is not within the permissible limits" when I try to upload a blob to my <code>Azure Storage Account</code>. </p>
  
  <p><a href="https://i.stack.imgur.com/iyZz5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iyZz5.jpg" alt="enter image description here"></a></p>
  
  <p>Below is my code.</p>
  
  <pre><code>private async Task UploadToAzureBlobStorage(string path, string fileName) {
      try {
          if (CloudStorageAccount.TryParse(StorageConnectionString, out CloudStorageAccount cloudStorageAccount)) {
              var cloudBlobClient = cloudStorageAccount.CreateCloudBlobClient();
              var cloudBlobContainer = cloudBlobClient.GetContainerReference(path);
              var cloudBlockBlob = cloudBlobContainer.GetBlockBlobReference(fileName);
              await cloudBlockBlob.UploadFromFileAsync(path);
          }
          else {
              throw new CustomConfigurationException(CustomConstants.NoStorageConnectionStringSettings);
          }
      }
      catch(Exception ex) {
          throw new CustomConfigurationException($ "Error when uploading to blob: {ex.Message}");
      }
  }
  </code></pre>
  
  <p>Anyone else have faced this same issue?</p>