I'm trying to make a functional basic Azure Cosmos Database workflow.
From my Azure account, I'm getting the endpoint address from the HOST param in the "Connection String" in "Settings", and the key from the "PRIMARY PASSWORD" param.
string EndpointUri = "https://<my-database-name>.mongo.cosmos.azure.com";
string PrimaryKey ="<my-key>";
then I try to create the client (following these instructions):
CosmosClient cosmosClient = new(
uri,
key,
new CosmosClientOptions(){
ApplicationRegion = Regions.WestUS
}
);
database = cosmosClient.CreateDatabaseIfNotExistsAsync(id: databaseId).Result;
But I keep getting and error
The remote name could not be resolved
Am I using the Endpoint and Key wrong...?