【问题标题】:SubDomain's cookie in asp.net Core Identityasp.net Core Identity 中 SubDomain 的 cookie
【发布时间】:2020-06-08 13:14:03
【问题描述】:

在域和子域 asp.net core 2.2 和 entity framework core 2.6 之间共享和使用 Identity cookie 我找到了投注解决方案这个链接Multiple & SubDomain's cookie in asp.net Core Identity

但我在 IdentityOption 中没有找到 Cookies 属性

options.Cookies.ApplicationCookie.CookieManager = new CookieManager();

有什么想法吗?

【问题讨论】:

    标签: asp.net-core .net-core


    【解决方案1】:

    身份 cookie 的设置不再是 ASP.NET Core 2.0 中 IdentityOptions 的一部分:

    https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x?view=aspnetcore-3.1#authentication-middleware-and-services

    您可以配置为:

    services.ConfigureApplicationCookie(options => options.CookieManager = new CookieManager());
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-18
      • 2018-06-03
      • 1970-01-01
      • 2017-10-29
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 2019-11-09
      相关资源
      最近更新 更多