<bdo id='3T3Qo'></bdo><ul id='3T3Qo'></ul>
      <tfoot id='3T3Qo'></tfoot>

        <small id='3T3Qo'></small><noframes id='3T3Qo'>

      1. <i id='3T3Qo'><tr id='3T3Qo'><dt id='3T3Qo'><q id='3T3Qo'><span id='3T3Qo'><b id='3T3Qo'><form id='3T3Qo'><ins id='3T3Qo'></ins><ul id='3T3Qo'></ul><sub id='3T3Qo'></sub></form><legend id='3T3Qo'></legend><bdo id='3T3Qo'><pre id='3T3Qo'><center id='3T3Qo'></center></pre></bdo></b><th id='3T3Qo'></th></span></q></dt></tr></i><div id='3T3Qo'><tfoot id='3T3Qo'></tfoot><dl id='3T3Qo'><fieldset id='3T3Qo'></fieldset></dl></div>
      2. <legend id='3T3Qo'><style id='3T3Qo'><dir id='3T3Qo'><q id='3T3Qo'></q></dir></style></legend>

      3. 如何在 ASP.NET 样板中使用 LDAP(免费启动模板)

        How to use LDAP in ASP.NET Boilerplate (Free Startup Template)(如何在 ASP.NET 样板中使用 LDAP(免费启动模板))

            <tbody id='V2GUr'></tbody>

          1. <small id='V2GUr'></small><noframes id='V2GUr'>

            <tfoot id='V2GUr'></tfoot>
              <legend id='V2GUr'><style id='V2GUr'><dir id='V2GUr'><q id='V2GUr'></q></dir></style></legend>

              <i id='V2GUr'><tr id='V2GUr'><dt id='V2GUr'><q id='V2GUr'><span id='V2GUr'><b id='V2GUr'><form id='V2GUr'><ins id='V2GUr'></ins><ul id='V2GUr'></ul><sub id='V2GUr'></sub></form><legend id='V2GUr'></legend><bdo id='V2GUr'><pre id='V2GUr'><center id='V2GUr'></center></pre></bdo></b><th id='V2GUr'></th></span></q></dt></tr></i><div id='V2GUr'><tfoot id='V2GUr'></tfoot><dl id='V2GUr'><fieldset id='V2GUr'></fieldset></dl></div>
                  <bdo id='V2GUr'></bdo><ul id='V2GUr'></ul>

                • 本文介绍了如何在 ASP.NET 样板中使用 LDAP(免费启动模板)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想使用免费启动模板版本的 Boilerplate 在我的 .net Core 应用程序中通过 Active Directory 集成身份验证.我按照 documentation 中的说明进行操作,例如安装 Abp.Zero.Ldap 包,创建 LdapAuthenticationSource 类,注入依赖,如:

                  I would like to integrate authentication via Active Directory in my .net Core app using Free Startup Template version of the Boilerplate. I followed the instruction in the documentation such as installing Abp.Zero.Ldap package, creating LdapAuthenticationSource class, and injecting dependency like:

                  [DependsOn(typeof(AbpZeroLdapModule))]
                  public class MyApplicationCoreModule : AbpModule
                  {
                      public override void PreInitialize()
                      {
                          Configuration.Modules.ZeroLdap().Enable(typeof (MyLdapAuthenticationSource));    
                      }
                  
                      ...
                  }
                  

                  我是否需要使用实现 ILdapSettings 接口的类来定义任何自定义设置?或创建任何引用 的类或文件这个文件夹?

                  Do I need to define any custom settings by using a class implementing ILdapSettings interface? Or create any class or files referencing to this folder?

                  推荐答案

                  .NET Core 2.0

                  这些说明可能不起作用,因为 .NET Core 的 LDAP/AD 身份验证扩展尚未实现.

                  .NET Core 2.0

                  The instructions may not work, as LDAP / AD auth extension for .NET Core isn't implemented yet.

                  跟踪此功能:https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2755

                  通过安装 Abp.Zero.Ldap 包,您已经在引用该模块(移动 这里).

                  By installing Abp.Zero.Ldap package, you're already referencing that module (moved here).

                  如 LDAP/Active Directory > 设置中所述:

                  LdapAuthenticationSource 期望 ILdapSettings 作为构造函数参数.此接口用于获取域、用户名和密码等 LDAP 设置以连接到 Active Directory.默认实现(LdapSettings 类)从设置管理器获取这些设置.

                  LdapAuthenticationSource expects ILdapSettings as a constructor argument. This interface is used to get LDAP settings like domain, user name and password to connect to Active Directory. Default implementation (LdapSettings class) gets these settings from the setting manager.

                  如果您使用设置管理器,那么没问题.您可以使用 设置管理器 API 更改 LDAP 设置.如果需要,您可以将初始/种子数据添加到数据库以默认启用 LDAP 身份验证.

                  If you work with Setting manager, then no problem. You can change LDAP settings using setting manager API. If you want, you can add an initial/seed data to database to enable LDAP auth by default.

                  因此,您无需创建实现 ILdapSettings 的类.使用设置管理器的好处是它将设置存储在您的数据库中.自定义类用于从其他地方获取它或对其进行硬编码(如果您只是想尝试,这很有用,但在生产/git commit 中是一个很大的禁忌).

                  So, you don't need to create a class that implements ILdapSettings. The benefit of using the Setting Manager is that it stores the settings in your database. A custom class is for getting it from elsewhere or hardcoding it (useful if you just want to try, but a big no-no in production / git commit).

                  首先,您可以在 DefaultSettingsCreator 与 LdapSettingNames:

                  For a start, you can add seed data for your Host in DefaultSettingsCreator with LdapSettingNames:

                  public void Create()
                  {
                      // ...
                  
                      // LDAP
                      AddSettingIfNotExists(LdapSettingNames.IsEnabled, "false");
                      // AddSettingIfNotExists(LdapSettingNames...
                  }
                  

                  这篇关于如何在 ASP.NET 样板中使用 LDAP(免费启动模板)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                  Adding headers in ASP.NET MVC 3(在 ASP.NET MVC 3 中添加标头)
                  Response.Redirect strips Header Referrer - Possible to Add it Back?(Response.Redirect 剥离 Header Referrer - 可以将其添加回来吗?)
                  Faking browser request in ASP.net C#(在 ASP.net C# 中伪造浏览器请求)
                  How to delete IIS custom headers like X-Powered-By: ASP.NET from response?(如何从响应中删除 IIS 自定义标头,例如 X-Powered-By: ASP.NET?)
                  What does vary:accept-encoding mean?(变化:接受编码是什么意思?)

                    <legend id='B43BI'><style id='B43BI'><dir id='B43BI'><q id='B43BI'></q></dir></style></legend>
                  1. <tfoot id='B43BI'></tfoot>

                    <small id='B43BI'></small><noframes id='B43BI'>

                      • <i id='B43BI'><tr id='B43BI'><dt id='B43BI'><q id='B43BI'><span id='B43BI'><b id='B43BI'><form id='B43BI'><ins id='B43BI'></ins><ul id='B43BI'></ul><sub id='B43BI'></sub></form><legend id='B43BI'></legend><bdo id='B43BI'><pre id='B43BI'><center id='B43BI'></center></pre></bdo></b><th id='B43BI'></th></span></q></dt></tr></i><div id='B43BI'><tfoot id='B43BI'></tfoot><dl id='B43BI'><fieldset id='B43BI'></fieldset></dl></div>
                          <tbody id='B43BI'></tbody>

                          <bdo id='B43BI'></bdo><ul id='B43BI'></ul>