Server Error in '/' Application.

'HttpContext.SetSessionStateBehavior' can only be invoked before 'HttpApplication.AcquireRequestState' event is raised.

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.InvalidOperationException: 'HttpContext.SetSessionStateBehavior' can only be invoked before 'HttpApplication.AcquireRequestState' event is raised.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: 'HttpContext.SetSessionStateBehavior' can only be invoked before 'HttpApplication.AcquireRequestState' event is raised.]
   System.Web.HttpContext.SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior) +5087982
   IBServiceModule.Init(HttpApplication application) in C:\agent\_work\1\s\HorizonWeb Dev\App_Code\VB_Code\IBSeriveModule.vb:22
   System.Web.HttpApplication.InitModulesCommon() +202
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1089
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +232
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +360


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