David Rutter
David Rutter

Reputation: 11

Getting start with ArangoDB and .Net - Exception thrown by AddConnection()

I am hoping that someone who has worked with ArangoDB and .Net and C# can help me out.

When I call ArangoClient.AddConnection() an exception gets thrown (of type 'System.ArgumentException' occurred in mscorlib.dll). The message is "An item with the same key has already been added."

The call to ArangoClient is: ArangoClient.AddConnection("127.0.0.1", 8529, false, "NancyTest", "NancyTest", "root");

Any ideas?

Upvotes: 1

Views: 804

Answers (1)

yojimbo87
yojimbo87

Reputation: 68335

You most probably already created a connection with specified alias. With a driver version 0.9.0 and higher you can check if the specified alias already exists through ASettings.HasConnection(string alias) static method.

Upvotes: 2

Related Questions