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

HttpContext.Current null in callbacks (caused by WithCurrentCulture) #41

Open
Bouke opened this issue May 26, 2021 · 0 comments
Open

HttpContext.Current null in callbacks (caused by WithCurrentCulture) #41

Bouke opened this issue May 26, 2021 · 0 comments

Comments

@Bouke
Copy link

Bouke commented May 26, 2021

I'm using Asp.Net Identity on .Net Framework 4.8 and MVC 5. I'm using HttpContext to track contextual information about a request. However Asp.Net Identity uses ConfigureAwait(false), which means that HttpContext.Current becomes null in callbacks. For example when subclassing PortalSignInManager, HttpContext.Current is null inside SignInAsync.

I suppose WithCurrentCulture was introduced when Asp.Net Core didn't flow HttpContext. However that's no longer the case for newer versions, and this workaround is breaking my application.

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

1 participant