I've set up a serverless azure cosmos graph db account and now I'm trying to connect to it using the following code:
.AddSingleton(s =>
{
var connectionPool = new ConnectionPoolSettings
{
MaxInProcessPerConnection = 32,
PoolSize = 4,
ReconnectionAttempts = 4,
ReconnectionBaseDelay = TimeSpan.FromSeconds(1)
};
var server = new GremlinServer("<project-name>.documents.azure.com", 443, true, "/dbs/<DatabaseName>/colls/<GraphName>", "<primary key>");
return new GremlinClient(server, connectionPoolSettings: connectionPool);
})
The GremlinClient throws an Exception with the message
The server returned status code '200' when status code '101' was expected.
I'm using Gremlin.Net 3.6.0 with NET 6 Any ideas?
The issue was resolved by changing the uri from
<project-name>.documents.azure.com
to
<project-name>.gremlin.cosmosdb.azure.com