-
Notifications
You must be signed in to change notification settings - Fork 65
add support for context.SetSessionStateBehavior #399
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try combining the existing endpoint into the new session feature?
src/Microsoft.AspNetCore.SystemWebAdapters/Internal/SessionStateFeature.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.AspNetCore.SystemWebAdapters.CoreServices/SessionMiddleware.cs
Outdated
Show resolved
Hide resolved
@Clounea Thanks for working on this. I've looked into the question you had about the exception and it appears to have been caused by trying to commit a readonly session. I've fixed that. I've also pushed a few changes to clean up the tests to use xunit theories, as well as integrating in some changes from main that affect how we're structuring features. |
@@ -2,13 +2,51 @@ | |||
// The .NET Foundation licenses this file to you under the MIT license. | |||
|
|||
using System; | |||
using System.Web.SessionState; | |||
|
|||
namespace Microsoft.AspNetCore.SystemWebAdapters; | |||
|
|||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] | |||
public sealed class SessionAttribute : Attribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Clounea could you add some tests for this? other than that, I'm good with these changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I could. I will also add tests for overriding scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some nullability issues - make sure when you compile locally that there are no compile warnings (ide warnings are not an issue). If you do dotnet build
locally and see warnings, those are the ones that turn in errors on CI
...soft.AspNetCore.SystemWebAdapters.CoreServices.Tests/SessionState/SessionIntegrationTests.cs
Outdated
Show resolved
Hide resolved
...soft.AspNetCore.SystemWebAdapters.CoreServices.Tests/SessionState/SessionIntegrationTests.cs
Outdated
Show resolved
Hide resolved
...soft.AspNetCore.SystemWebAdapters.CoreServices.Tests/SessionState/SessionIntegrationTests.cs
Outdated
Show resolved
Hide resolved
...soft.AspNetCore.SystemWebAdapters.CoreServices.Tests/SessionState/SessionIntegrationTests.cs
Outdated
Show resolved
Hide resolved
…/SessionState/SessionIntegrationTests.cs
@Clounea LGTM! Thanks for iterating on this |
close #371
I don't know if I could change the metadata. Comments are welcome.
And I don't find a good place to add tests. It seems that I need a web app and a beginrequesthandler where I could setsessionstatebehavior.