I'm having some trouble nutting out why I'm unable to connect to a new database I've created at MongoHQ.

I want to include the correct connection string in my Web.config file and have my Mongo object refer to that for the database connection.

The connection strings (edited, obviously) are:

> 
> Public Access
> 
> 
> mongo flame.mongohq.com:27065/dunedin -u {username} -p {password}
> 
> 
> AWS Internal Access
> 
> 
> mongo flame.local.mongohq.com:27065/dunedin -u {username} -p {password}
> 
> 
> 

Obviously, I've included my correct username in password in place of the placeholders in the braces.

My code is:

```
string connection = ConfigurationManager.ConnectionStrings["DBMongo"].ConnectionString;
var mongo = new Mongo(connection);

mongo.Connect();

```

However, as soon as I try to instantiate that Mongo object, I get a format exception saying

> 
> Invalid connection string on:
> 
> 
> 

What is that connection string supposed to look like for remotely-hosted MongoDB instances?

**EDIT:**

The Connection String entry in Web.Config is

```
<add name="DBMongo" connectionString="mongo flame.mongohq.com:27065/dunedin -u ausername -p apassword"/>

```