[CSHARP-521] SafeMode always throws an exception when used with server versions 2.1.0 and newer with auth Created: 05/Jul/12  Updated: 20/Mar/14  Resolved: 10/Jul/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.5
Fix Version/s: 1.6

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When SafeMode is on the C# driver sends the getLastError command to the admin database. Starting with server version 2.1.0 this fails when using authentication because the connection isn't authenticated to use the admin database (the server didn't used to require authentication for the getLastError command). So the getLastError command must be sent to the same database as the operation it is checking to avoid authentication errors.



 Comments   
Comment by auto [ 06/Jul/12 ]

Author:

{u'date': u'2012-07-05T16:30:24-07:00', u'email': u'robert@10gen.com', u'name': u'Robert Stam'}

Message: CSHARP-521: Make sure getLastError gets sent to the same database as the update operation in case authentication is on.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/2725d81a4904d365ffcd03effc705ff7649f1c1a

Generated at Wed Feb 07 21:37:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.