views:

19

answers:

1

Using the c# driver and MongoDB on windows server. Connection code looks like this:

using (var mongo = new Mongo(ConnectionString))
{
     mongo.Connect();  
     //do stuff
     mongo.Disconnect();
}

if ConnectionString == "mongodb://LocalHost/MyCollection"

everything is fine if ConnectionString == anything else... doesn't work... even if I use my local IP

IE:

mongodb://192.168.0.55/MyCollection

Fails with the error:

"No connection could be made because the target machine actively refused it 192.168.0.55:27017"

Mongo IS running, I can connect on the other machine locally..

I'm at a loss for how to diagnose/fix this issue, any suggestions?

A: 

Is Windows Firewall blocking access?

John Zablocki
Update: I needed to install the mongodb service with a binding to 127.0.0.1 AND the internal or external IP as well, so the binding flag on the command line is a comma seperated list of IPS to listen to and I was only listening to localhost
Tom DeMille