'Cannot acquire data from CosmosDB through app
I am having trouble connecting to Azue Cosmos db using azure connection string, like that:
new CosmosClient("AccountEndpoint=https://XADDRESS:443/;AccountKey=XKEY;");
Executing following like gives me error in about 2-3min:
await cos.CreateDatabaseIfNotExistsAsync("DBNAME")
Error message: The requested name is valid, but no data of the requested type was found
I have downloaded emulator to test locally created cosmos db and everything seems to be working there without any problems. Might it be firewall or dns problem? I have also no problem creating my own db/container or add an item directly through Azure portal.
Solution 1:[1]
Without seeing everything in context some simple troubleshooting tasks would include:
See if you currently have configured your DB with "All Networks" or "Selected Networks" within the "Firewall and virtual networks" section of the portal Selected networks setting requires a firewall configuration.
Review document Configure IP firewall in Azure Cosmos DB to validate you've allowed any specific IP addresses (if you are running the app locally).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jay Gordon |
