Server Error in '/' Application.

Unable to refresh the specified object.  The object no longer exists in the database.

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.InvalidOperationException: Unable to refresh the specified object.  The object no longer exists in the database.

Source Error:


Line 29:             _Product = Product.GetProduct(int.Parse(myParent.RouteValue("Control").ToString()));
Line 30:             _Product.ViewCount = _Product.ViewCount + 1;
Line 31:             _Product.Update();
Line 32:         }
Line 33:     }

Source File: c:\inetpub\vhosts\khudari.com\httpdocs\Public\Controls\Product\View.ascx.cs    Line: 31

Stack Trace:


[InvalidOperationException: Unable to refresh the specified object.  The object no longer exists in the database.]
   System.Data.Linq.DataContext.Refresh(RefreshMode mode, IEnumerable entities) +1219035
   Project.Core.Utilities.SQLCoordinator.Update(Type type, Object obj, Object sender, Boolean fireEvents) in D:\khudari\Project\Project\Project.core\Utilities\SQLCoordinator.cs:50
   Project.Core.Utilities.SQLCoordinator.AddOperation(Object obj, SQLOperationType sqlOPType) in D:\khudari\Project\Project\Project.core\Utilities\SQLCoordinator.cs:82
   Project.Core.Site.Product.Update() in D:\khudari\Project\Project\Project.core\Site\Product.cs:64
   Public_Controls__Product_View.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\khudari.com\httpdocs\Public\Controls\Product\View.ascx.cs:31
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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