Is this compatible with CosmosClient on an ASP.net Core application?
maxdev429 opened this issue · 3 comments
I am trying to use the cosmosdb-server for testing an ASP.net core application, but I always get an exception when trying to interact with the server:
System.Net.Http.HttpRequestException : The SSL connection could not be established, see inner exception. ---- System.Security.Authentication.AuthenticationException : The remote certificate is invalid according to the validation procedure.
Did I do something wrong?
I did not find a way to disable SSL certificate verification for CosmosClient.
I know, that the older DocumentClient has an option to pass a custom handler to ignore the SSL certificate, but there does not seem to be such an option for the CosmosClient.
@maxdev429 Maintainer of the Cosmos JavaScript SDK here. You'll likely need some way to bypass SSL validation during your tests. The .NET SDK has a thread on that here that might help Azure/azure-cosmos-dotnet-v2#284.
@southpolesteve Yeah, I already stumbled on that too but that only provides a solution for the v2-DocumentClient, not for the v3-CosmosClient.
Does it solve if you can set custom certs and CA to both server and client? For the server, we can change to accept them.