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 392:        var dc = GetDataContext();
Line 393:        var map = dc.GetSessionMap();
Line 394:        return map[n];
Line 395:    }
Line 396:

Source File: d:\ssha2019\app_code\dataHelper.cs    Line: 394

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +36
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +51
   DataHelper.GetSessionId(String sid, Boolean review) in d:\ssha2019\app_code\dataHelper.cs:394
   ASP._Page_sessions_cshtml.Execute() in d:\ssha2019\sessions.cshtml:8
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +182
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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