2
最近,我已經安裝RavenDB
(一堆程序集:客戶端,數據庫,嵌入式)通過NuGet
程序包管理器。我已經配置DocumentStore
這樣的:訪問RavenDB時獲取System.Net.Sockets.SocketException
public override void Load()
{
Bind<IDocumentStore>().ToMethod(
context => {
var documentStore = new EmbeddableDocumentStore {
Url = "http://localhost:8080",
DefaultDatabase = "ampDatabase",
UseEmbeddedHttpServer = true
};
return documentStore.Initialize();
}
).InSingletonScope();
Bind<IDocumentSession>().ToMethod(context =>
context.Kernel.Get<IDocumentStore>().OpenSession()
).InRequestScope();
}
後這段代碼被稱爲:
documentSession.Store(idea);
documentSession.SaveChanges();
我得到System.Net.Sockets.SocketException
:
無連接可以作出,因爲 目標機器積極拒絕它127.0.0.1:8080
我錯過了什麼?