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 12:     {
Line 13:        //Avoid session["terms"] null error page showing up
Line 14:         if (Session["terms"] == null){
Line 15:            Session["terms"] = 0;
Line 16:         }

Source File: c:\inetpub\wwwroot\medicalregister.com.au\CMSWebParts\MRAWebParts\MRACustomSearchDialog.ascx.cs    Line: 14

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() +171
   CMSWebParts_MRAWebParts_MRACustomSearchDialog.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\medicalregister.com.au\CMSWebParts\MRAWebParts\MRACustomSearchDialog.ascx.cs:14
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e) +73
   CMS.PortalControls.CMSAbstractWebPart.OnLoad(EventArgs e) +186
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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