title: Azure CloudFile - "The specifed resource name contains invalid characters."
body: <p>I'm trying to download a file from <code>Azure File Storage</code> to a local file and get this exception:</p>
  
  <blockquote>
    <p>"The specifed resource name contains invalid characters."</p>
  </blockquote>
  
  <p>Here's the code:</p>
  
  <pre><code>if (_cloudFileShare.Exists())
  {
        CloudFileDirectory rootDir = _cloudFileShare.GetRootDirectoryReference();    
        CloudFileDirectory tempDir = rootDir.GetDirectoryReference("temp");
        if (tempDir.Exists())
        {
          var file = tempDir.GetFileReference(saveFrom);
          file.DownloadToFile(saveTo, FileMode.Open);// OFFENDING LINE
        }
   }
  </code></pre>
  
  <p>The <code>saveTo</code> argument is a string and the value is something like this:</p>
  
  <pre><code>"C:\Users\Me\AppData\Local\Temp\tmpF2AD.tmp"
  </code></pre>
  
  <p>The <code>saveFrom</code> argument is something like this:</p>
  
  <p><a href="https://storageaccount.file.core.windows.net:443/fileshare/temp/tmpA2DA.tmp" rel="noreferrer">https://storageaccount.file.core.windows.net:443/fileshare/temp/tmpA2DA.tmp</a></p>
  
  <p>I'm creating the argument using this function:</p>
  
  <pre><code>var saveTo = Path.GetTempFileName();
  </code></pre>
  
  <p>What am I doing wrong?  I don't have much experience with Azure.</p>