How to connect Management Studio to embedded RavenDB in winforms app?

656 views
Skip to first unread message

Sean Kearon

unread,
Apr 16, 2012, 4:32:27 PM4/16/12
to rav...@googlegroups.com
I'm using an embedded DB in a winforms app:

         store = new EmbeddableDocumentStore
         {
            DataDirectory = "Data",
            UseEmbeddedHttpServer = true
            //,Url = "http://localhost:123/sk"
         };

I want to use Management Studio to browse the data.  How do I do this?

Damian Hickey

unread,
Apr 16, 2012, 4:45:31 PM4/16/12
to rav...@googlegroups.com
You need to deploy Raven.Studio.xap into the same directory as your winforms app exe.

Added it your project 'As a link' and set Copy to Output Directory to 'Copy if newer'.

Then browse to the url that your are specifying below.

Sean Kearon

unread,
Apr 16, 2012, 6:17:15 PM4/16/12
to rav...@googlegroups.com
Thanks Damian, but I still can't access the UI.  Is there anything else I need to do?

Itamar Syn-Hershko

unread,
Apr 16, 2012, 6:21:55 PM4/16/12
to rav...@googlegroups.com

Itamar Syn-Hershko

unread,
Apr 16, 2012, 6:24:04 PM4/16/12
to rav...@googlegroups.com

Sean Kearon

unread,
Apr 16, 2012, 6:46:22 PM4/16/12
to rav...@googlegroups.com
Calling store.OpenSession() gives: Target machine actively refused connection.  I've got this:

         store = new EmbeddableDocumentStore
         {
            DataDirectory = "Data",
            UseEmbeddedHttpServer = true
            ,Url = "http://localhost:8080"
         };
 
         store.Initialize();
         NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);

Then this:

         using (var session = store.OpenSession())
         {
            session.Store(new Company...

Boom!  

Any ideas?

Oren Eini (Ayende Rahien)

unread,
Apr 17, 2012, 4:16:18 AM4/17/12
to rav...@googlegroups.com
Sean,
If you specify Url, it override the DataDirectory and makes RavenDB think you are using a remote db.
What you have there is sufficent, and you should be able to go into http://localhost:8080 and see it.

Sean Kearon

unread,
Apr 17, 2012, 1:37:15 PM4/17/12
to rav...@googlegroups.com
Thanks, that worked.
Reply all
Reply to author
Forward
0 new messages