Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Reference exception in InProc mode #101

Open
faraazaamir opened this issue Oct 12, 2023 · 1 comment
Open

Null Reference exception in InProc mode #101

faraazaamir opened this issue Oct 12, 2023 · 1 comment

Comments

@faraazaamir
Copy link

faraazaamir commented Oct 12, 2023

When using SessionStateModuleAsync (2.0.0) in InProc mode, I get the following exception when the application is launched. With version 1.1.0 there is no error, but with version 2.0.0 the below exception is thrown. Please advise:

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:

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:

[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.AspNet.SessionState.SessionStateStoreProviderAsyncBase.Initialize(String name, NameValueCollection config) +45
Microsoft.AspNet.SessionState.InProcSessionStateStoreAsync.Initialize(String name, NameValueCollection config) +48
Microsoft.AspNet.SessionState.SessionStateModuleAsync.InitModuleFromConfig(HttpApplication app, SessionStateSection config) +696
Microsoft.AspNet.SessionState.SessionStateModuleAsync.Init(HttpApplication app) +234
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +586
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +254
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +346

[HttpException (0x80004005): Object reference not set to an instance of an object.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +552
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +737

@sharadshahihw
Copy link

sharadshahihw commented Oct 18, 2023

I got the exception too. There's a pull request which fixes it.
#98

This works
#94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants