商店初始化:
private static IDocumentStore CreateDocumentStore()
{
var store = (DocumentStore) new EmbeddableDocumentStore
{
ConnectionStringName = "RavenDb",
};
NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);
store.Initialize();
store.Conventions.MaxNumberOfRequestsPerSession = 500;
return store;
}
配置:
</configSections>
<appSettings>
<add key="Raven/Port" value="8080"/>
<add key="Raven/DataDir" value="~\@App_Data"/>
<add key="Raven/AnonymousAccess" value="Get" />
</appSettings>
<connectionStrings>
<clear/>
<add name="RavenDb" connectionString="DataDir=~\@App_Data\Raven" />
</connectionStrings>
应用程序工作和乌鸦持续存在一些数据,我只是无法进入管理工作室
答案 0 :(得分:2)
默认情况下,工作室不提供服务。在构建商店实例时,您必须启用RavenDB的嵌入式Web服务器:
var store = (DocumentStore) new EmbeddableDocumentStore
{
ConnectionStringName = "RavenDb",
UseEmbeddedHttpServer = true
};