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

Session: obsolete APIs removed in 3.0 #331

Open
JunTaoLuo opened this issue Dec 13, 2018 · 0 comments
Open

Session: obsolete APIs removed in 3.0 #331

JunTaoLuo opened this issue Dec 13, 2018 · 0 comments
Labels
3.0.0 Announcements related to ASP.NET Core 3.0 Announcement Breaking change Documented The breaking change has been published to the .NET Core docs Migrated
Milestone

Comments

@JunTaoLuo
Copy link

JunTaoLuo commented Dec 13, 2018

This is a follow up to #257. The 3.0 release will remove the obsolete Cookie APIs in Session.

The recommended changes are:

public void ConfigureServices(ServiceCollection services)
{
    services.AddSession(options =>
    {
        // Removed obsolete APIs
        options.CookieName = "SessionCookie";
        options.CookieDomain = "contoso.com";
        options.CookiePath = "/";
        options.CookieHttpOnly = true;
        options.CookieSecure = CookieSecurePolicy.Always;
        // new API
        options.Cookie.Name = "SessionCookie";
        options.Cookie.Domain = "contoso.com";
        options.Cookie.Path = "/";
        options.Cookie.HttpOnly = true;
        options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
    });
}

See the linked issue for more details and discussion.

[This announcement has been migrated to: dotnet/docs#14844]

@JunTaoLuo JunTaoLuo added Announcement Breaking change 3.0.0 Announcements related to ASP.NET Core 3.0 labels Dec 13, 2018
@JunTaoLuo JunTaoLuo added this to the 3.0.0 milestone Dec 13, 2018
@aspnet aspnet locked and limited conversation to collaborators Dec 13, 2018
@rynowak rynowak removed their assignment Sep 30, 2019
@scottaddie scottaddie added the Documented The breaking change has been published to the .NET Core docs label Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.0.0 Announcements related to ASP.NET Core 3.0 Announcement Breaking change Documented The breaking change has been published to the .NET Core docs Migrated
Projects
None yet
Development

No branches or pull requests

3 participants