1
這裏的示例代碼:我試圖初始化烏鴉分貝時會發生存取錯誤
private static Raven.Client.Embedded.EmbeddableDocumentStore _documentStore;
public static Raven.Client.Embedded.EmbeddableDocumentStore documentStore
{
get
{
if (_documentStore == null)
{
_documentStore = new Raven.Client.Embedded.EmbeddableDocumentStore
{
DataDirectory = "App_Data/RavenDbData",
UseEmbeddedHttpServer = true
};
_documentStore.Initialize();
}
return _documentStore;
}
}
異常消息looke這樣當_documentStore.Initialize();線被稱爲:
System.Net.HttpListenerException:該進程無法訪問該文件,因爲它正被另一個進程
我這個頁面上找到(http://www.lansweeper.com/kb/HttpListenerException.aspx )它需要改變IP地址。我不知道如何爲ravendb做到這一點。 – BraveNewMath