title: azure blob uploadfile bad request
body: <p>Hi I am new to azure I am trying to upload a file to azure container using</p>
  
  <pre><code>    static void UploadBlobFromFile(Uri blobEndpoint, string accountName, string accountKey)
      {
          // Create service client for credentialed access to the Blob service.
          CloudBlobClient blobClient =
              new CloudBlobClient(blobEndpoint,
                  new  StorageCredentials(accountName, accountKey));
  
          // Get a reference to a container, which may or may not exist.
          CloudBlobContainer container = blobClient.GetContainerReference("StackOverflowAnalysis");
  
          // Create a new container, if it does not exist
          //container.CreateIfNotExist();
  
          // Get a reference to a blob, which may or may not exist.
          CloudBlockBlob blob = container.GetBlockBlobReference("QueryResults.csv");
  
          // Upload content to the blob, which will create the blob if it does not already exist.
          using (var filst = System.IO.File.OpenRead(@"c:\users\hmohamed\Downloads\QueryResults.csv"))
          { blob.UploadFromStream(filst); }
      }'
  </code></pre>
  
  <p>I am getting  error Bad request 400; I am trying this in mvc app I have also tried it with console application where i got error the process cannot access file because it is being used by another process. Responses to similar posts advice to run netstat command to fix the problem but I do not know how to use it and what parameters to supply; can some one please help</p>