I'm having trouble accessing my RavenHQ database using the RavenDB .Net client

If you are experiencing problems accessing your RavenHQ database from the RavenDB .Net client, please check the following:

1. Verify that the connection string is correct, and includes an API key

2. Verify that the API key is active, and is authorized to access the database

3. Verify that the API key has the correct permission level (read vs. read/write)

If you need any additional support, we are always here to help - just send us an email at support@ravenhq.com.

Have more questions? Submit a request

5 Comments

  • 0
    Avatar
    Brian Henry

    How is this article helpful?  Essentially it says, "make sure everything is right" huh?  Maybe an example would helpful?

  • 0
    Avatar
    Brian Henry

    Here's the missing example: <add name="RavenDB" connectionString="Url=https://ibis.ravenhq.com/databases/<DBNAME>;ApiKey=<KEY>" />

     

     

  • 0
    Avatar
    H Plyler

    Here's the problem, We need to be able to use the .net nugget package to connect to your server.

    Here is how we connect in .net

    private static IDocumentStore store = new DocumentStore()
    {
    Urls = new[] { "url" },
    Database = "databaseName"
    }.Initialize();

    Do you see and API key anywhere? Where do we put it. Because if I put it in the URL I get an error.

  • 0
    Avatar
    H Plyler

    Here is the relevent documentation from Hibernating rhinos:

    https://ravendb.net/docs/article-page/3.0/Csharp/client-api/setting-up-connection-string

  • 0
    Avatar
    Dan Bishop

    Hi there, in order to connect you need to specify the API key in a separate property as follows:

    var store = new DocumentStore

    {

       Url = "https://YOURDBURL.ravenhq.com",

       ApiKey = "YOURAPIKEY",

       Database = "YOURDATABASE"

    };

    store.Initialize();

     

     

Please sign in to leave a comment.