Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 2:  @{
Line 3:      string[] sess = (string[])Session["site"];
Line 4:      string folder = sess[1];
Line 5:  
Line 6:      string cloud = "/cloud/";

Source File: c:\Websites\msa\Public\Layouts\_Layout.cshtml    Line: 4

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_layouts__Layout_cshtml.Execute() in c:\Websites\msa\Public\Layouts\_Layout.cshtml:4
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +98
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +184
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.WebPages.<>c__DisplayClass3.<RenderPageCore>b__2(TextWriter writer) +308
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +107
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +88
   System.Web.WebPages.WebPageBase.PopContext() +309
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +141


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