Implementation of SharePoint 2010 Form identity authentication (SQL-based)

Source: Internet
Author: User
Tags connectionstrings

1: Create an identity-based application (see previous ad-based)

Sql-membershipprovider  Members
Sql-rolemanager Role

2: Modify the Admin center, the application we created, and the Web service inside the Securitytokenserviceapplication this 3-place Web. config

Every place to add a string to the database (preferably a new account to access the database, or may not be able to access data)

<connectionStrings>
<add name= "sqlConnectionString" connectionstring= "Data source=jiangly;initial Catalog=sql-auth; User id=jly; [Email protected] "/>
</connectionStrings>

Locate the <system.web></system.web> of the central Administration, and configure the following:

Code

<rolemanager defaultprovider= "AspNetWindowsTokenRoleProvider" enabled= "true" Cacherolesincookie= "false" >

<providers>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>

<membership defaultprovider= "Sql-membershipprovider" >

<providers>

<add connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</providers>

</membership>


<rolemanager defaultprovider= "AspNetWindowsTokenRoleProvider" enabled= "true" Cacherolesincookie= "false" >

<providers>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>

<membership defaultprovider= "Sql-membershipprovider" >

<providers>

<add connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</providers>

</membership>

Locate the application's <system.web></system.web>, and configure the following

Code

Code highlighting produced by Actipro Codehighlighter (freeware)
Http://www.CodeHighlighter.com/--><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 connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</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 "/>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>


<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 connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</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 "/>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>

Find the Securitytokenserviceapplication platform Web. config, which has no <system.web></system.web> inside, and you need to add it yourself

Code

Code highlighting produced by Actipro Codehighlighter (freeware)
Http://www.codehighlighter.com/--><system.web>

<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 "/>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>

<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 connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</providers>

</membership></system.web>


<system.web>

<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 "/>

<add connectionstringname= "sqlConnectionString" applicationname= "/" description= "Stores and retrieves roles from SQL Server "Name=" Sql-rolemanager "type=" System.Web.Security.SqlRoleProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/>

</providers>

</roleManager>

<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 connectionstringname= "sqlConnectionString" passwordattemptwindow= "5" enablepasswordretrieval= "false" Enablepasswordreset= "false" requiresquestionandanswer= "true" applicationname= "/" requiresuniqueemail= "true" passwordformat= "Hashed" description= "Stores and retrieves membership data from SQL Server" Name= "Sql-membershipprovider "Type=" System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>

</providers>

</membership>
</system.web>

3 After the change, you create a user (this is too simple, I will not speak ha), join the site collection, finished. Use this account to test it, haha

Resources:

Http://www.sharepointchick.com/archive/2010/05/07/configuring-claims-and-forms-based-authentication-for-use-with-a.aspx

Http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/41e5fea7-a2e5-4965-aa5c-78d76be3f4f0

http://devmeat.com/show/5739564

Http://blogs.technet.com/b/mahesm/archive/2010/04/07/configure-forms-based-authentication-fba-with-sharepoint-2010.aspx

Implementation of SharePoint 2010 Form identity authentication (SQL-based)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.