title: Azure Storage 400 on one WebServer but not dev or local
body: <p>Connection to my Azure Storage Account on the Production App Services (WebSite) results in a 400 Error.  Connecting to the same Azure Storage Account from local development box works correctly.
  Connection to the same Azure Storage Account from our Development App Service (Website) works correctly.
  The production server uses the Azure Key Vault for the connection setting and I have checked the value is being returned.  I have intentionally modified the key vault value to ensure it was being used.</p>
  <p>The following throughs a 400 Bad Request Error. There is no Inner Exception Message.</p>
  <pre><code>
  CloudStorageAccount storageAccount = CloudStorageAccount.Parse(_configuration.GetSection(&quot;AzureStorageConnection&quot;).GetSection(&quot;ConnectionString&quot;).Value);
  CloudTableClient tableClients = storageAccount.CreateCloudTableClient();
  
  </code></pre>
  <p>Additional information:
  I have checked the Overview and the General Settings between the Development App Service and Production App Service.  They match where appropriate.  Something seems to wrong for this App Service.
  I have switched the look up from the keyvault to configuration file and that has worked.  The issue seems to be with pulling the key value from the keyvault.  I have compared the value stored in the keyvault to the app configuration to make sure they match.</p>
  <p>Exception Returned:</p>
  <pre><code>The remote server returned an error: (400) Bad Request. 
  Stack trace1: at Microsoft.Azure.Cosmos.Table.RestExecutor.TableCommand.Executor.ExecuteAsync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken callerCancellationToken) 
  at Microsoft.Azure.Cosmos.Table.RestExecutor.TableCommand.Executor.&lt;&gt;c__DisplayClass0_0`1.&lt;ExecuteSync&gt;b__0() 
  at Microsoft.Azure.Cosmos.Table.RestExecutor.Utils.RestUtility.RunWithoutSynchronizationContext[T](Func`1 actionToRun) 
  at Microsoft.Azure.Cosmos.Table.RestExecutor.TableCommand.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) 
  at Microsoft.Azure.Cosmos.Table.RestExecutor.TableRestExecutor.ExecuteTableOperation[TResult](TableOperation operation, CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) 
  at Microsoft.Azure.Cosmos.Table.TableOperation.Execute(CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) 
  at Microsoft.Azure.Cosmos.Table.CloudTable.Create(TableRequestOptions requestOptions, OperationContext operationContext, String serializedIndexingPolicy, Nullable`1 throughput, Nullable`1 defaultTimeToLive) 
  at Microsoft.Azure.Cosmos.Table.CloudTable.CreateIfNotExists(TableRequestOptions requestOptions, OperationContext operationContext, String serializedIndexingPolicy, Nullable`1 throughput, Nullable`1 defaultTimeToLive) 
  at Esperanto.Manager.Services.AzureTableStorageManagement.ReadAllEntity() in /home/vsts/work/1/s/MyCode/AzureTableStorageManagement.cs:line 199
  </code></pre>
  <p>Please note originally only one line of code was shown because it was the line mentioned in the stacktrace but it may be the line that is immediately after.  This has been included.</p>