【问题标题】:will Microsoft.Identity.Web work with Asp.net web apps with aspx pages?Microsoft.Identity.Web 将与带有 aspx 页面的 Asp.net Web 应用程序一起使用吗?
【发布时间】:2021-11-19 14:50:55
【问题描述】:

Microsoft.Identity.Web 是否可以与带有 aspx 页面的 Asp.net Web 应用程序一起使用?如果支持我如何注册认证?。

在 .NetCore Startup.cs 中

services.AddAuthentication().AddMicrosoftIdentityWebApp(Configuration.GetSection("AzureAdB2C"), "b2c", "cookiesB2C");

我们在 .net core 中使用上述行来配置身份 web。

在使用 aspx 的 Asp.net Webapp 中

我们如何注册?

【问题讨论】:

    标签: asp.net


    【解决方案1】:

    根据这个,是的,你可以这样做:

    https://docs.microsoft.com/en-us/aspnet/identity/overview/getting-started/adding-aspnet-identity-to-an-empty-or-existing-web-forms-project

    我不知道是否要创建用户数据库(用户表),然后创建角色表,但以上概述了所需的步骤,因此这是可能的。

    根据上面,是的,需要一个用户数据库表,并创建。

    所以如何设置这个对于一个如此简单的答案来说有点多,但至少上面确实概述了步骤。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-06
      • 2021-08-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多