.Net Core Cookie 认证,怎么写入两个 Cookie?

services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
    .AddCookie(options =>
    {
        options.Cookie.Name = "TestCookie1";
        options.LoginPath = new PathString("/Account/Login");
        options.AccessDeniedPath = new PathString("/Account/Denied");
    })
    .AddCookie(options =>
    {
        options.Cookie.Name = "TestCookie2";
        options.LoginPath = new PathString("/Account/Login");
        options.AccessDeniedPath = new PathString("/Account/Denied");
    });

.Net Core Cookie 认证,怎么写入两个 Cookie?上面这样写是不能运行的


海绵宝宝撒
浏览 727回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP