【问题标题】:How to read ASP .Net cookie in WebForms ASP .NET site如何在 WebForms ASP .NET 站点中读取 ASP .Net cookie
【发布时间】:2021-03-15 19:09:24
【问题描述】:

我正在迁移很多 WebForms 应用程序(旧的 site 模板)。我正在 ASP .Net Core 中开发一个登录并为多个 Web 应用程序创建一个共享 cookie,如下所示:

https://jakeydocs.readthedocs.io/en/latest/security/data-protection/compatibility/cookie-sharing.html

新应用没问题,但旧网站 ASP .NET 不使用 Startup.cs 类

如何在旧的 Web 窗体应用程序中验证这个 cookie 新的 ASP .NET Core?

谢谢!

【问题讨论】:

  • Upps,我忘记了标题中的“Core” ==> 如何在 WebForms ASP .NET 站点中读取 ASP .Net CORE cookie

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


【解决方案1】:

如果您尝试在从 Core 到 Webforms 的等效“Startup.cs”中执行某些操作,则可以使用 Global.asax 类。以下是更多信息:What is the purpose of global.asax in asp.net

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-05
    • 1970-01-01
    • 1970-01-01
    • 2016-05-30
    • 2020-03-09
    • 2021-12-20
    • 2021-06-28
    • 1970-01-01
    相关资源
    最近更新 更多