title: Azure storage account throws HTTP 400 error when writing
body: <p>I've developed a simple Azure Webapp with C#. And use the table of Azure storage account to save some kinds of records of the website.</p>
  
  <p>It works well on my own computer on both read and write operations, with the real connection string. I can find the record with the "Azure Storage Explorer".</p>
  
  <p>However, after I deploy the app. The cloud version keeps throwing Http 400 error when I try to write the table. But the read operation still works fine. (The local version is always OK.)</p>
  
  <p><a href="https://i.stack.imgur.com/jy8rQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jy8rQ.png" alt="enter image description here"></a></p>
  
  <p>The problem is wierd. Please help me with it.</p>
  
  <p>Thanks.</p>
  
  <p>== UPDATE ==</p>
  
  <p>The save &amp; query code is something like this.</p>
  
  <pre><code>public class CodeSnippet: TableEntity
  {
      public string Title { get; set; }
      public string Author { get; set; }
      public string FileType { get; set; }
      public string Code { get; set; }
  
      public Guid Save()
      {
          var guid = Guid.NewGuid();
          var datetime = DateTimeOffset.UtcNow;
  
          this.RowKey = guid.ToString();
          this.PartitionKey = datetime.ToString();
  
          var json = JsonConvert.SerializeObject(this);
  
          var client = AzureStorage.DefaultClient.Instance.GetTableClient();
          var table = client.GetTableReference("privateshare");
          var insertOp = TableOperation.Insert(this);
  
          table.Execute(insertOp);
          return guid;
      }
  
      public static CodeSnippet Query(Guid? guid)
      {
          if (guid == null)
          {
              return null;
          }
          var client = AzureStorage.DefaultClient.Instance.GetTableClient();
          var table = client.GetTableReference("privateshare");
  
          var query = new TableQuery&lt;CodeSnippet&gt;()
              .Where(TableQuery.GenerateFilterCondition(
                  "RowKey", QueryComparisons.Equal, guid.ToString()))
              .Take(1);
          var res = table.ExecuteQuery(query);
          return res?.First();
      }
  }
  </code></pre>