I’m new to RavenDB and the embeddable stuff. I searched on Google for almost two hours now, but can’t find the solution for my problem; probably because I’m still a RavenDB n00b 🙂
My init of the document store looks like this and works fine (I can query for documents):
IocContainer.Instance.RegisterSingle(() =>
{
var ds = new EmbeddableDocumentStore {DataDirectory = "Data", UseEmbeddedHttpServer = true};
return
ds
.Initialize()
.OpenSession();
});
At the first one or two requests the routing is working like I expect it to, so I end up at my HomeController. After another refresh I end up at /raven/studio.html?... Great! But not where I expected to land!
If I then change the URL to /Home, like my controller, I see this result:
Could not figure out what to do
Your request didn't match anything that Raven knows to do, sorry...
Of course, when I remove the UseEmbeddedHttpServer it works like it did before but that is not what I want. I want to be able to browse the documents.
My default MVC generated RouteConfig with the * added to {id}:
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{*id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
Any help will be appreciated!
Turn off the internal Http-server in RavenDb or map the RavenDb-http-server to another port
1:
2:
In case 2 Raven Studio is now reachable on port 8181 instead of being mapped to the port (80) of your website