このチュートリアルに従って、ravenDb を永続化オブジェクトとして使用しています。
コントローラーで渡された値を保存しようとしたときに、次のエラーが発生しました
> No connection could be made because the target machine actively
> refused it 127.0.0.1:8080
Global.asax.cs
public class MvcApplication : System.Web.HttpApplication
{
public static IDocumentStore RavenDBDocumentStore { get; private set; }
private static void CreateRavenDBDocumentStore()
{
RavenDBDocumentStore = new DocumentStore
{
ConnectionStringName = "ravenDB"
}.Initialize();
}
protected void Application_Start()
{
...
CreateRavenDBDocumentStore();
}
}
8081
またはでポート番号を変更してみまし8085
たが、どちらの方法でもエラーメッセージは同じです。
これが私の接続文字列セクションです
<connectionStrings>
<add name="DefaultConnection"
providerName="System.Data.SqlClient"
connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-RavenMvc-20121125145005;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-RavenMvc-20121125145005.mdf" />
<add name="ravenDB"
connectionString="Url=http://localhost:8085"/>
</connectionStrings>
Raven サーバーが開始された後は、すべて問題ありません。