1

I have a small console application doing some persistence with Raven which is working fine, but I just can't get the Raven Studio Web-App working. I think I have read every article/blog post on the web which is around, but I haven't got it working.

The project is referencing the Raven.Client.Embedded, Raven.Client.Lightweight and Raven.Storage.Esent assemblies)

Here is the really simple code starting up my console app:

class Program
{
   static void Main(string[] args)
{
  EmbeddableDocumentStore store = new EmbeddableDocumentStore { DataDirectory = @"C:\temp\ravendata", UseEmbeddedHttpServer = true };
  store.Initialize();

  Console.WriteLine("Initialized");
  while (true)
  {
    string line = Console.ReadLine();
    if (line == "w")
    {
      Changeset cs = CreateChangeset();

      using (var session = store.OpenSession())
      {
        session.Store(cs);
        session.SaveChanges();
      }
      Console.WriteLine("Written.");
    }
  }

The question is: Where to put the Raven.Studio.xap in order to get it running in the browser (http://localhost:8080/Raven/studio.html)? It's not working in the bin/debug output folder of my console app (which would be the most logical area where it should be), as well as it isn't if I put it in the root of my console application.

Sorry to ask this thing again, but it seems there is some point I am missing on this to get it up and running. ;)

Thanks for your help, R's, Rene

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
renew
  • 11
  • 5
  • Renew, It _should_ be in the bin\debug What do you mean, it doesn't work? What do you get on the server? – Ayende Rahien Jan 04 '12 at 12:45
  • "Missing file Could not find file Raven.Studio.xap, which contains the RavenDB Studio functionality. Please copy the Raven.Studio.xap file to the base directory of RavenDB and try again. " – renew Jan 04 '12 at 13:17
  • Copy Raven.Studio.xap to the root of your web application. Which works every time. http://www.dalsoft.co.uk/blog/index.php/2012/04/12/mvc-get-ravendb-up-and-running-in-5-minutes-using-ninject/#RavenDB_Management_Studio – DalSoft Apr 26 '12 at 15:15

1 Answers1

2

You are right, I've tried it using a new console application project and had the same issues, altough I copied the file Raven.Studio.xap into the \bin\debug AFTER I had seen the error message for the first time.

I found out, that the reason for this has to do with browser-caching. Even though the file would be available now, the embedded http-server returns 304 Not Modified, because it had sent the If-None-Match header into the request. Therefore, the cached "not-found" page in the browser cache will be used.

I fixed it and sent a patch to Ayende. However the solution now is: 1) make sure Raven.Studio.xap is under \bin\debug 2) clear the browsers cache

Daniel Lang
  • 6,819
  • 4
  • 28
  • 54