-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.11, 2.2.3
-
Component/s: GridFS
-
None
If I have a main MongoClient that contains files I want to move from one server to another MongoClient (different connectionstring)
I get "InvalidOperationException: A nested call to RequestStart was made that is not compatible with the existing request."
Example code to reproduce the problem:
var guiDb = new MongoClient("mongodb://server1:27017/GridFSTest").GetServer().GetDatabase("GridFSTest"); var fs = guiDb.GetGridFS(new MongoGridFSSettings() { Root = "TestArea" }); var allFiles = fs.FindAll().ToList(); var server = new MongoClient("mongodb://server2:27017/GridFSTestTracker").GetServer().GetDatabase("GridFSTest"); var gridfs = server.GetGridFS(new MongoGridFSSettings() { Root = "TestArea" }); foreach (var file in allFiles) { gridfs.Upload(file.OpenRead(), file.Name, new MongoGridFSCreateOptions { Id = file.Id, ContentType = file.ContentType, UploadDate = DateTime.Now, Metadata = file.Metadata }); // This row throws the exception }