Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

mongoHQ

Hi, trying to connect to the mongo server i get this message

Command 'authenticate' failed: auth fails (response: { "errmsg" : "auth fails", "ok" : 0.0 })

i'm using the variable "MONGOHQ_URL". Thanks

  1. Are you connecting using the mongo.exe, or is this from within the app? If you're connecting using mongo.exe, you need to pick out username and password from the url and pass that using the -p and -u args.

  2. friism closed this discussion on 08 Jul, 2011 08:26 PM.

  3. gatossapato re-opened this discussion on 08 Jul, 2011 09:23 PM

  4. Hi, it's from the app

    var connString = ConfigurationManager.AppSettings.Get("MONGOHQ_URL");
    var mongoUrl = new MongoUrl(connString);

    var server = MongoServer.Create(mongoUrl);
    (...)

    Thanks

  5. There might be a bug in that example, we're working on a full tutorial. Hang on.

  6. Right, finally got time to actually try it out, this code is tested:

    var connectionstring = ConfigurationManager.AppSettings.Get("MONGOHQ_URL");
    var mongoUrl = new MongoUrl(connectionstring);
    var database = MongoDatabase.Create(mongoUrl);
    

    I've updated the knowledgebase too.

  7. friism closed this discussion on 10 Jul, 2011 01:50 AM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac