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 41:         if (!Page.IsPostBack)
Line 42:         {
Line 43:             News n = new News(_connStr, _articleId);
Line 44: 
Line 45:             //does this article exist for this application?

Source File: e:\WWW\Redesign06\protected\PrintArticle.aspx.cs    Line: 43

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_PrintArticle.Page_Load(Object sender, EventArgs e) in e:\WWW\Redesign06\protected\PrintArticle.aspx.cs:43
   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