Yogesh Vedpathak

Yogesh Vedpathak

  • 679
  • 1.3k
  • 156.8k

Microsoft.Azure.Cosmos.CosmosException: Response status 400

May 25 2020 8:33 AM
I am trying to configure Services into Asp.net core Application while creating below excpetion throws
  1. // This is my code  
  2. public void ConfigureServices(IServiceCollection services)  
  3. {  
  4. services.AddControllersWithViews();  
  5. services.AddSingleton<ICosmosDBService>(InitializeCosmosClientInstanceAsync(Configuration.GetSection("CosmosDb")).GetAwaiter().GetResult());  
  6. }  
Exception :
Microsoft.Azure.Cosmos.CosmosException: 'Response status code does not indicate success: 400 Substatus: 0 Reason: (Exception of type 'Microsoft.Azure.Documents.DocumentClientException' was thrown., Windows/10.0.18362 cosmos-netstandard-sdk/3.3.0).'

Answers (8)