I am unsure if the format of my connections string is correct when I am trying to connect to Cosmos DB from Bot Framework 4.6:
IStorage memoryStorage = null;
// memoryStorage = new MemoryStorage();
memoryStorage = new CosmosDbPartitionedStorage(
new CosmosDbPartitionedStorageOptions
{
CosmosDbEndpoint = "https://myDB.mongo.cosmos.azure.com:443/",
AuthKey = "MyKey",
DatabaseId = "dev",
ContainerId = "conversation-state"
}
);
var conversationState = new Models.ConversationState(memoryStorage);
var UserState = new UserState(memoryStorage);
services.AddSingleton(conversationState);
services.AddSingleton(UserState);
Cosmos service URL seem to be correct using the documentation here: https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-v4-storage?view=azure-bot-service-4.0&tabs=csharp#memory-storage
It say to use SSL, so I used port 443, but the port on the connection string say 10255
What am I missing?
This is the error message I am getting:
The bot encounted an error or bug: Response status code does not indicate success: 404 Substatus: 0 Reason: (, Request URI: /, RequestStats: , SDK: Windows/10.0.17763 cosmos-netstandard-sdk/3.2.1).