-
Notifications
You must be signed in to change notification settings - Fork 0
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 | PostConfigureApplicationCookieTicketStore #1522
Comments
Everything seems to work fine as soon as I comment out the
|
Which version of Duende IdentityServer are you using?
7.1.0-rc.1
Which version of .NET are you using?
.NET 9
Describe the bug
After upgrading I am experiencing a null reference exception on startup. After looking at the changes, and debugging the
PostConfigureApplicationCookieTicketStore
locally I can see that the _licenseUsage is set to null in the constructor due to the httpContextAccessor being null. I do have the line in service registration that adds the HttpContextAccessor to the service provider, but am assuming this is null due to the the constructor being executed shortly after app.RunAsync() is called and there is no active HTTP request yet.To Reproduce
Upgrade to 7.1.0-rc.1, fix compile errors (if any) and startup the application. I have a combination of the Entity Framework and ASP.NET Identity quickstart.
Expected behavior
Expected app to start up without errors, and allow navigation around the home/index page, login page, and all other ASP.NET identity related pages.
Log output/exception with stacktrace
Additional context
I have gone through the breaking changes section in the release and updated the constructor of my custom / extended configuration store DB context class, and namespaces from IdentityModel to Duende.IdentityModel. I haven't changed anything else except for the other Duende packages for ASP.NET Identity and Entity Framework Core.
I do have some additional cookie option related calls in my code such as
services.ConfigureApplicationCookie()
. I've tried commenting these out but they haven't seemed to have an effect. You might notice the other middleware listed in the stack trace. Those are only enabled in the dev environment and are mapped to specific paths that aren't being hit.Hope this helps. I may have something weird in my startup code that is affecting it, but figured I'd create an issue and start the discussion. Its worth noting that the previous 7.0.8 version had worked just fine, and I haven't made many major changes to the code. Let me know if you need any additional information.
The text was updated successfully, but these errors were encountered: