From ac1c9debf64977a67a23d158946a6b7eb2d2be15 Mon Sep 17 00:00:00 2001 From: Sneha Gunda Date: Tue, 22 May 2018 12:57:55 -0700 Subject: [PATCH 1/2] Updating credential settings --- MyTaskListApp/DAL/Dal.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/MyTaskListApp/DAL/Dal.cs b/MyTaskListApp/DAL/Dal.cs index 3559e10..ddd57ba 100644 --- a/MyTaskListApp/DAL/Dal.cs +++ b/MyTaskListApp/DAL/Dal.cs @@ -72,10 +72,7 @@ private IMongoCollection GetTasksCollection() MongoIdentity identity = new MongoInternalIdentity(dbName, userName); MongoIdentityEvidence evidence = new PasswordEvidence(password); - settings.Credentials = new List() - { - new MongoCredential("SCRAM-SHA-1", identity, evidence) - }; + settings.Credential = new MongoCredential("SCRAM-SHA-1", identity, evidence); MongoClient client = new MongoClient(settings); var database = client.GetDatabase(dbName); @@ -94,10 +91,8 @@ private IMongoCollection GetTasksCollectionForEdit() MongoIdentity identity = new MongoInternalIdentity(dbName, userName); MongoIdentityEvidence evidence = new PasswordEvidence(password); - settings.Credentials = new List() - { - new MongoCredential("SCRAM-SHA-1", identity, evidence) - }; + settings.Credential = new MongoCredential("SCRAM-SHA-1", identity, evidence); + MongoClient client = new MongoClient(settings); var database = client.GetDatabase(dbName); var todoTaskCollection = database.GetCollection(collectionName); @@ -126,4 +121,4 @@ protected virtual void Dispose(bool disposing) # endregion } -} \ No newline at end of file +} From 785639deb64d5b6bf68125fc6e0428b487c33eea Mon Sep 17 00:00:00 2001 From: Sneha Gunda Date: Tue, 22 May 2018 12:59:29 -0700 Subject: [PATCH 2/2] Updating driver version --- MyTaskListApp/packages.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MyTaskListApp/packages.config b/MyTaskListApp/packages.config index ef89833..8a909c8 100644 --- a/MyTaskListApp/packages.config +++ b/MyTaskListApp/packages.config @@ -35,12 +35,12 @@ - - - + + + - \ No newline at end of file +