amit thakur

amit thakur

  • 1.6k
  • 112
  • 1.5k

not able to make connection to remote server in c#

May 27 2016 4:10 AM
const string connectionString ="mongodb://username:[email protected]:27017/Eventlog";
MongoClientSettings settings = MongoClientSettings.FromUrl(new MongoUrl(connectionString));
var client = new MongoClient(settings);
var server = client.GetServer();
var db = server.GetDatabase(databaseName);

Answers (1)