I have a CosmosDB database with one collection. If I go on Azure portal to the CosmosDB section, and then to the entity explorer, I can see the database name. If I put that database name in this code (client is a DocumentClient):
client.CreateDatabaseQuery().Where(d => d.Id == databaseName).AsEnumerable().FirstOrDefault();
It returns an exception:
System.AggregateException: 'One or more errors occurred. (The given header was not found.)'
Has anyone seen this before?