【发布时间】:2012-06-24 12:58:32
【问题描述】:
最近我通过NuGet 包管理器安装了RavenDB(一堆程序集:客户端、数据库、嵌入式)。我已经像这样配置了DocumentStore:
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
我错过了什么?
【问题讨论】:
标签: asp.net-mvc exception ravendb