2

I'm following this tutorial to use ravenDb as my persistance object.

On controller when I tried to save passed values I've got following error

> 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(); } } 

I already tried with changing port number with 8081 or 8085 but either way error message is the same.

Here's my connection string section

 <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> 

After Raven server been started everything is fine.

5
  • have you turned off windows firewall? Commented May 29, 2013 at 8:09
  • @BlackICE just tried with firewall off. error is the same :( Commented May 29, 2013 at 8:17
  • Do you have any errors in the ravendb console window? Commented May 29, 2013 at 8:21
  • feel so stupid :) I actually not started raven server. Sorry! Commented May 29, 2013 at 8:29
  • happens to all of us :) Commented May 29, 2013 at 8:31

1 Answer 1

2

You need to make sure that RavenDB server is running, and using the same port as your application does.

In the connection string you specify the port of the server to connect to, but you probably did not run the RavenDB server itself.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks for your feedback but I already tried with port 8081 and 8085, error remains
Actually, it means to opposite: RavenDB is not running on this port. Make sure to run the server on this port.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.