Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Post Undeleted by Vinney Kelly
deleted 1782 characters in body
Source Link
Vinney Kelly
  • 5.1k
  • 1
  • 27
  • 31

I have been ableSuccess! In order to get Raven Studio runningworking with myan ASP.NET 5 web app. Though I'm not sure what wasproject, you need to put the issueRaven.Studio.Html5.zip file in my last test, here's the working combination I've discovered today:wwwroot directory.

  1. Install RavenDB.Client, RavenDB.Database, and RavenDB.Embedded NuGet packages

  2. From Startup method in Startup.cs, include the statement Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);

  3. From the same Startup method, initialize the RavenDB context. Here's what my configuration looks like:

    public class RavenContext : IDisposable { public static IDocumentStore DocumentStore { get; private set; } public static IDocumentStore Init() { DocumentStore = CreateEmbeddableStore(); DocumentStore.Initialize(); return DocumentStore; } public void Dispose() { DocumentStore.Dispose(); DocumentStore = null; } private static IDocumentStore CreateEmbeddableStore() { var databaseName = "ASPNET5_Test"; return new EmbeddableDocumentStore { DataDirectory = "App_Data/RavenDB", DefaultDatabase = databaseName, UseEmbeddedHttpServer = true, Conventions = BuildDocumentConvention(), Configuration = { Port = 8080 } }; } } public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080); RavenContext.Init(); } } 

I have been able to get Raven Studio running with my ASP.NET 5 web app. Though I'm not sure what was the issue in my last test, here's the working combination I've discovered today:

  1. Install RavenDB.Client, RavenDB.Database, and RavenDB.Embedded NuGet packages

  2. From Startup method in Startup.cs, include the statement Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);

  3. From the same Startup method, initialize the RavenDB context. Here's what my configuration looks like:

    public class RavenContext : IDisposable { public static IDocumentStore DocumentStore { get; private set; } public static IDocumentStore Init() { DocumentStore = CreateEmbeddableStore(); DocumentStore.Initialize(); return DocumentStore; } public void Dispose() { DocumentStore.Dispose(); DocumentStore = null; } private static IDocumentStore CreateEmbeddableStore() { var databaseName = "ASPNET5_Test"; return new EmbeddableDocumentStore { DataDirectory = "App_Data/RavenDB", DefaultDatabase = databaseName, UseEmbeddedHttpServer = true, Conventions = BuildDocumentConvention(), Configuration = { Port = 8080 } }; } } public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080); RavenContext.Init(); } } 

Success! In order to get Raven Studio working with an ASP.NET 5 project, you need to put the Raven.Studio.Html5.zip file in the wwwroot directory.

Post Deleted by Vinney Kelly
Source Link
Vinney Kelly
  • 5.1k
  • 1
  • 27
  • 31

I have been able to get Raven Studio running with my ASP.NET 5 web app. Though I'm not sure what was the issue in my last test, here's the working combination I've discovered today:

  1. Install RavenDB.Client, RavenDB.Database, and RavenDB.Embedded NuGet packages

  2. From Startup method in Startup.cs, include the statement Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);

  3. From the same Startup method, initialize the RavenDB context. Here's what my configuration looks like:

    public class RavenContext : IDisposable { public static IDocumentStore DocumentStore { get; private set; } public static IDocumentStore Init() { DocumentStore = CreateEmbeddableStore(); DocumentStore.Initialize(); return DocumentStore; } public void Dispose() { DocumentStore.Dispose(); DocumentStore = null; } private static IDocumentStore CreateEmbeddableStore() { var databaseName = "ASPNET5_Test"; return new EmbeddableDocumentStore { DataDirectory = "App_Data/RavenDB", DefaultDatabase = databaseName, UseEmbeddedHttpServer = true, Conventions = BuildDocumentConvention(), Configuration = { Port = 8080 } }; } } public partial class Startup { public void Configuration(IAppBuilder app) { ConfigureAuth(app); Raven.Database.Server.NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080); RavenContext.Init(); } }