Closed kmahendra-cohesion closed 2 years ago
Hi!
I know it definitely works with Aura, which is neo4j+s
only - so can you show the code you are running, as I can't replicate this.
Oh, I'm trying to connect to Aura. This is what I attempted to run in my dotnet 6 project:
Startup.cs
public void ConfigureServices(IServiceCollection services)
{
var client = new GraphClient(new Uri(Configuration["Uri"]),
Configuration["Username"], Configuration["Password"]);
client.ConnectAsync().Wait(); // Exception on this line
services.AddSingleton<IGraphClient>(client);
}
Sure, so you can't use HTTP
to connect to Aura, you need to use Bolt
- which means you need to use the BoltGraphClient
- so swap GraphClient
for BoltGraphClient
:
public void ConfigureServices(IServiceCollection services)
{
var client = new BoltGraphClient(Configuration["Uri"],
Configuration["Username"], Configuration["Password"]);
client.ConnectAsync().Wait(); // Exception on this line
services.AddSingleton<IGraphClient>(client);
}
Thanks! It worked.
Unable to connect to neo4j and neo4j+s scheme databases.
Version:
Expected behavior Being able to connect to and query neo4j and neo4j+s scheme databases.