Server Error in '/' Application.
Could not load file or assembly 'MongoDB.Bson, Version=1.7.0.4714, Culture=neutral, PublicKeyToken=f686731cfb9cc103' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly 'MongoDB.Bson, Version=1.7.0.4714, Culture=neutral, PublicKeyToken=f686731cfb9cc103' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Source File: d:\Yogendra\MyPractise\TestWebsite\Default.aspx.cs Line: 28
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MongoDB.Bson, Version=1.7.0.4714, Culture=neutral, PublicKeyToken=f686731cfb9cc103' could not be loaded.
Which way is better? Save a media file to MongoDB as array of bytes or as string?
ReplyDeleteprivate static void Statistics(string collectionName)
ReplyDelete{
new BsonDocument { { "collstats", collectionName } };
var command = new BsonDocumentCommand(new BsonDocument { { "collstats", collectionName } });
var stats = mongoDb.RunCommand(command);
Console.WriteLine($" * Collection : {collectionName}");
Console.WriteLine($" * Count : {stats["count"].AsInt32} documents");
Console.WriteLine($" * Average Doc Size: {stats["avgObjSize"].AsInt32} bytes");
Console.WriteLine($" * Total Storage : {stats["storageSize"].AsInt32} bytes");
Console.WriteLine("\n");
}