【转】http://maiomar.itegyptcorp.com/blog/Lists/Posts/Post.aspx?ID=109

Interesting, isn't it???

Why would you want to authenticate by your AD account from FBA while you can still do by Windowns Authentication..

Actually i didn't find a reason but i was giving SharePoint course, when a Trainee told me one reason, its better User Interface for the end user, seems that end user does not like the windows authentication... well okay

So we did this lab, but if you find more reasons why would you do it, please write a comment... :-)

So here is the steps:

First let me tell you we will edit in 3 web.config files...

1- Of our web app.

2- Central administration

3- STS Secure token Service

so lets start:

Step 1:

Go to web.config of your web app, and add those lines:

<membership defaultProvider="i">
      <providers>
        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
     
<add name="admembers"
           type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="adconn"
           enableSearchMethods="true"
           attributeMapUsername="sAMAccountName" />
 
</providers>
    </membership>
    <roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">
      <providers>
        <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      </providers>
    </roleManager>

</system.web>
 
<connectionStrings>
   <add name="adconn"
        connectionString="LDAP://crmdemo.com/DC=crmdemo,DC=com" />
</connectionStrings>
 
Note: I am highlighting </system.web> as it already exists, you will add the membership above it and below it, you will add the connection string.
 
 Step 2:

Open Central administration web.config:

<membership defaultProvider="admembers">
   <providers>
      <add name="admembers"
           type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="adconn"
           enableSearchMethods="true"
           attributeMapUsername="sAMAccountName" />
   </providers>
</membership>
 
  </system.web>
 
<connectionStrings>
   <add name="adconn"
        connectionString="LDAP://crmdemo.com/DC=crmdemo,DC=com" />
</connectionStrings>

Note: I am highlighting </system.web> as it already exists, you will add the membership above it and below it, you will add the connection string.

Step 3:

Now we add the same to STS Secure Token Service web.config,

To open it, open IIS 7 or if you have win 2008 R2 then your IIS is 7.5, anyway in both it is same steps:

Right Click on it and click explore, there are 3 files, we only want the web.config: now to the end of web.config

after </system.net> we will add the connection string:

</system.net>

<connectionStrings>
   <add name="adconn"         connectionString="LDAP://crmdemo.com/DC=crmdemo,DC=com" />
</connectionStrings>
 (此处貌似不需要加ADconn)
 
<system.web>  there was not system.web but we will add it
 
<membership defaultProvider="admembers">   
<providers>
<add name="admembers"
           type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="adconn"
           enableSearchMethods="true"
           attributeMapUsername="sAMAccountName" />
</providers>
</membership>
 
</system.web>

</configuration>

...... Last but not least :-)

This depends: if you created your web app. and kept the default selection of Classic Authentication selected, then we need to convert it to use Claims, to do this, Open SharePoint PowerShell an write the following:

$w = Get-SPWebApplication http://servername:port
$w.UseClaimsAuthentication = "True";
$w.Update()
 
before this PS, go to CA > manage web app > select your web app and from ribbon > click Authentication provider >

You will see Forms dimmed, after the PS command it will be enabled, and you can write your membership name as it was in web.config, and as below.....

Now try.... yes try it, open your site, if you tried to login using FBA and wrote Administrator, you will get access denied while this is Farm administrator account....

One last Step:

we need to the administrator of FBA as Secondary administrator:

go to CA > Manage web app > click site collection administrators > in secondary:

There is administrator from AD and from FBA..... :-)

add it, it should be like below: add administrator and any user you want from AD.


Now try to login to your site again using Forms authentication:

Next Post, i will tell you how to see only FBA without choosing, and still by AD account.

Good Luck, don't forget it to write comment to tell me about another reason..

转载于:https://www.cnblogs.com/ahjxxy/archive/2011/09/04/2166532.html

Forms Based Authentication FBA by AD in SharePoint 2010相关推荐

  1. SharePoint 2010 Form Authentication (SQL) based on existing database

    博客地址 http://blog.csdn.net/foxdave SharePoint 2010 表单认证,基于现有数据库的用户信息表 本文主要描述本人配置过程中涉及到的步骤,仅作为参考,不要仅限于 ...

  2. 国内首部Sharepoint 2010深入开发(工作流+安全性+单点登录+AD开发、认证等)

    简介:本课程是国内首部深入讲解Sharepoint 2010全程开发的课程,讲师为微软中国上海公司高级工程师.课程采用技术结合实例的方式讲解,涉及内容包括Sharepoint2010之Linq.WCF ...

  3. 论文笔记—ITS+假名管理—ASPA: Advanced Strong Pseudonym based Authentication in Intelligent Transport System

    ASPA: Advanced Strong Pseudonym based Authentication in Intelligent Transport System 文献翻译 目录 ASPA: A ...

  4. Visual Studio 2017无法验证许可证状态、登陆报错the broswer based authentication dialog failed to complete-亲测可行

    Visual Studio 2017/2019无法验证许可证状态.无法登陆.登陆错误 the broswer based authentication dialog failed to complet ...

  5. java的claims_How to implement claims based authentication in a java app?

    I'm currently working on a project where I'd like to use Claims based authentication (Using windows ...

  6. SharePoint 2010认证模式

    SharePoint 2010在用户认证模式上,较之以前的版本有了非常大的改变.在SharePoint 2010中,当你创建一个Web应用程序的时候,有两种认证方式可供选择:Windows认证模式or ...

  7. Introducing Document Management in SharePoint 2010 介绍SharePoint 2010中的文档管理

    Introducing Document Management in SharePoint 2010 介绍SharePoint 2010中的文档管理 This time I want to talk ...

  8. VSTO学习笔记(四)从SharePoint 2010中下载文件

    原文:VSTO学习笔记(四)从SharePoint 2010中下载文件 上一次我们开发了一个简单的64位COM加载项,虽然功能很简单,但是包括了开发一个64位COM加载项的大部分过程.本次我们来给CO ...

  9. Configuring SharePoint 2010 and ADFS v2 End to End-摘自网络

    摘自:http://blogs.technet.com/b/speschka/archive/2010/07/30/configuring-sharepoint-2010-and-adfs-v2-en ...

  10. SharePoint 2010中的客户端模型

    1.介绍 客户端模型是SharePoint 2010才提供的,可以更灵活的在任何客户端设备中操作SharePoint对象,在2007版本中没有客户端模型,2010中有三种客户端模型JavaScript ...

最新文章

  1. Postman收费太贵了,我决定用Postwoman...
  2. STL,ATL,WTL之间的联系和区别
  3. js对象与字符串相互转换
  4. Request_继承体系
  5. Java调试器–权威的工具列表
  6. 前端学习(3156):react-hello-react之脚手架文件_src
  7. C/C++ OpenCV之Scharr边缘检测
  8. React 16.7.0-alpha hooks 之规则
  9. 使用SecOC打造的CAN网络依旧很不安全
  10. 团队管理,领导的“无为”就是最大“有为”
  11. python中的单引号和双引号有什么区别_python中单引号和双引号有什么区别
  12. ASP.Net Core数据加密
  13. Dart语言中的Isolate
  14. 关于计算机的英语谚语,关于英语谚语83句
  15. 1计算机世界中的时间概念
  16. 动物识别系统代码python_动物识别专家系统课程设计
  17. 理论计算机科学逻辑博导,清华大学计算机科学与技术系博士生导师简介:应明生...
  18. 智能生活 App SDK 如何实现设备控制
  19. 计算机科学与技术论文提纲,论文提纲范文
  20. linux创建fcoe接口,英特尔:Open-FCoE 将被加入 Linux核心

热门文章

  1. BZOJ5074 小B的数字
  2. Blender插件初始化范例
  3. Linux下汇编语言学习笔记23 ---
  4. jQuery中animate()的方法以及$(body).animate({scrollTop:top})不被Firefox支持问题的解决...
  5. [转]windows2003的IIS详细设置方法
  6. OO第二次课程总结分析
  7. 【转】curl 查看一个web站点的响应时间(rt)
  8. 我也是不得不说我的学习能力下降了,这两天都没有完成一个模块
  9. Object-C中的非正式协议与正式协议
  10. iOS 给任意一个view转换为image的方法封装