Server Error in '/' Application.

'home' is not a valid 24 digit hex string.

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.FormatException: 'home' is not a valid 24 digit hex string.

Source Error:


Line 39:         var Collection = DataBase.GetCollection<BsonDocument>("NEWS");
Line 40: 
Line 41:         var filter = Builders<BsonDocument>.Filter.Eq("_id", ObjectId.Parse(sID));
Line 42:         var doc = Collection.Find(filter).FirstOrDefault();
Line 43: 

Source File: c:\inetpub\vhosts\himachalsearch.com\httpdocs\OurModules\NEWS\Detail.aspx.cs    Line: 41

Stack Trace:


[FormatException: 'home' is not a valid 24 digit hex string.]
   MongoDB.Bson.ObjectId.Parse(String s) +144
   news_Default2.loadNews(String sID) in c:\inetpub\vhosts\himachalsearch.com\httpdocs\OurModules\NEWS\Detail.aspx.cs:41
   news_Default2.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\himachalsearch.com\httpdocs\OurModules\NEWS\Detail.aspx.cs:19
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0