Server Error in '/' Application.

The given key was not present in the dictionary.

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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error:


Line 56:         if (!Page.IsPostBack)
Line 57:         {
Line 58:             News n = new News(_connStr, _articleId);
Line 59: 
Line 60:             //page title

Source File: e:\WWW\Redesign06\protected\ArticleView.aspx.cs    Line: 58

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12974457
   ESV.Entities.News.Load() in C:\vsProjects\eSchoolView\eSchoolView\esv.entities\News.cs:72
   ESV.Entities.News..ctor(String Connstr, Int64 NewsId) in C:\vsProjects\eSchoolView\eSchoolView\esv.entities\News.cs:51
   protected_ArticleView.Page_Load(Object sender, EventArgs e) in e:\WWW\Redesign06\protected\ArticleView.aspx.cs:58
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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