2

I am looking to see if I can access an embedded RavenDB database as part of a Datazen install.

So far I have a prototype console app that has some simple code as follows

private static void Connect()
    {
        string location = @"C:\Program Files\Datazen Enterprise Server\service\Raven";
        int port = 82;
        NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(port);
        var docStore = new EmbeddableDocumentStore()
                           {
                               //RunInMemory = true,
                               DataDirectory = location, 
                               UseEmbeddedHttpServer = true,                                   
                           };

        docStore.Configuration.Storage.Voron.AllowOn32Bits = true;

        docStore.Configuration.HostName = "localhost";
        docStore.Configuration.Port = port;

        docStore.Initialize();

        Console.WriteLine("Running...");
        Console.ReadLine();
    }

I am able to access the Raven studio now via the URL localhost:82 but this just displays the following message

No databases and no filesystems are available. Go ahead and create a database or distributed file system or manage your server

Am I looking in the wrong file location for the embedded database? The folder I am pointing to contains the following directories:

  • CompiledIndexCache
  • IndexDefinitions
  • Indexes
  • logs
  • system
  • temp

and files - Data - raven-data.ico

Edit From reading the following from the RavenDB docs I have now pointed to the following path C:\Program Files\Datazen Enterprise Server\service\data

this now returns the following when I attempt to access the Raven studio at localhost:82

Could not write to location: C:\Program Files\Datazen Enterprise Server\service\data. Make sure you have read/write permissions for this path.

I have tried setting the folder (which is set as read only) to not be. But it remains as showing read only in windows explorer (even if I try to make the entire Datazen Enterprise Server folder read/write and cascade to all child items.

obaylis
  • 2,904
  • 4
  • 39
  • 66

0 Answers0