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

AspNetSessionValueLayoutRenderer should be threadsafe #847

Closed
snakefoot opened this issue Aug 9, 2022 · 5 comments · Fixed by #850
Closed

AspNetSessionValueLayoutRenderer should be threadsafe #847

snakefoot opened this issue Aug 9, 2022 · 5 comments · Fixed by #850
Assignees
Milestone

Comments

@snakefoot
Copy link
Contributor

snakefoot commented Aug 9, 2022

AspNetSessionValueLayoutRenderer modifies the HttpContext.Items-collection, but this collection is not threadsafe.

Implement other threadsafe way of doing re-entrant checking. Ex. like this: getsentry/sentry-dotnet@e0d6b1d (Only possible for ASP_NET_CORE or NET46)

@snakefoot snakefoot added this to the 5.1.1 milestone Aug 9, 2022
@snakefoot
Copy link
Contributor Author

@bakgerman Maybe something for you ?

@bakgerman
Copy link
Contributor

Yes, I accept :)

@bakgerman
Copy link
Contributor

I have read the commit above and I now understand the AsyncLocal technique used.
it should be relatively easy to address this.
We can keep the old code maybe for NET35 platform.

@snakefoot
Copy link
Contributor Author

snakefoot commented Aug 10, 2022

Sounds good to me.

@bakgerman
Copy link
Contributor

PR submitted

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

Successfully merging a pull request may close this issue.

2 participants