RobThree / MongoRepository

Repository abstraction layer on top of Official MongoDB C# driver
https://www.nuget.org/packages/MongoRepository/
MIT License
307 stars 141 forks source link

Auth connection string. #26

Closed hrnkrdnz closed 8 years ago

hrnkrdnz commented 8 years ago

Hi Everyone,

I can't run auth connection string. I can connect with any mongodb Gui editor or mongo.exe but Mongorepository always gives error "Command 'authenticate' failed: auth failed (response: { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18 })". My connection string format is "mongodb://user:pass@localhost/DbName",

What is the problem? Thanks.

RobThree commented 8 years ago

Can you please post the version(s) of MongoDB, the driver you're using and MongoRepository? I'm using a similar setup in several places and have no problem connecting like this. Also: did you make sure the user is assigned to the correct DB?