Server Error in '/' Application.

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

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.Web.HttpException: Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

Source Error:


Line 38:         'Response.write("Site Map Started")
Line 39:         'Open DataBase
Line 40:         objConnection = New SqlConnection(Session("Mountain-High-Connection-String"))
Line 41:         Try
Line 42:             objConnection.Open()

Source File: C:\htdocs\mtnhighcycling\A_Main_Master_Page.vb    Line: 40

Stack Trace:


[HttpException (0x80004005): Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.]
   System.Web.UI.Page.get_Session() +166
   MasterPage.Get_Site_Map() in C:\htdocs\mtnhighcycling\A_Main_Master_Page.vb:40
   ASP.a_main_master_page_master.Page_Load(Object sender, EventArgs e) in C:\htdocs\mtnhighcycling\A_Main_Master_Page.master:115
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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