Hi Every one, Today we are going to see how to Configure Forms Based Authentication in SharePoint 2013. In SharePoint, Microsoft offering two different types of authentication such as Windows Authentication and Forms Based Authentication. By default we will get the windows authentication to our site but if we want to provide the Forms based authentication to our SharePoint site we must have to do some settings while creating of web application of a site. Now we will see step by step process of configuring forms based authentication in SharePoint 2013.
What is Windows Authentication in SharePoint ?
Windows authentication is a secure form of authentication which is offered by Microsoft and the user name and password are hashed before being sent across the network. When you enable the Windows authentication in our SharePoint Site, the client browser sends a strongly hashed version of the password in a cryptographic exchange with our Web Server. We will get the users information such as username, password, role, and group he/she belongs, from the Active Directory and store the user information into content database of SharePoint, this will happens in installation process of SharePoint Farm or we can do it after installation of SharePoint using user management services in SharePoint.
What is Form Authentication in SharePoint
Some companies maintain their employ user information in databases rather than Active Directory. So here all the users information such as usernames, passwords, roles and groups will stored in a database that may be MS SQL, Oracle or MySQL in this type of situations most of the companies will prefer to use form based authentication instead of rebuild the new Active Directory.
Configuring Forms Based Authentication in SharePoint 2013
Step 1 :First we have to create a web application and site a site collection.
Please find the below image and note done the settings which we need to do before we start
Step 2 :We created the web application and please click on create site collection in conformation window
Step 3 : Please Enter the following details:
After Creation of site collection we can see, the below screen in browser. So I have chosen Windows Authentication
as well as Forms Based Authentication so we will get the drop box like below if you choose only the Forms based
authentication you will get only one option in the drop down box that is Forms Authentication.
Till now we have finished the Web Application and Site Collection Creation. Now We need to set up our Users
Database.
Step 4 :In order to create membership database structure we will use the ASP .Net SQL Server Registration Tool
“asp_regsql.exe” which is located in “c:\Windows\Mincrosoft.Net\Framework\V4.0.30319\aspnet_regsql.exe”. Please
click on asp_regsql.exe file. We will get the following wizard window.
Note: Here i am using MS SQL Database so I used ASP .Net SQL Server Registration Tool and .Net Framework 4.0
Then we will get one wizard like below, have to follow
Click on Next button
Here we have to select our web application database name and click on next button
Click on finish Button
Step 5 :
Please find the below screen shoot.
Now we have to do the final step that is add some permissions to the user “dc\naspadmin01” on Content Database
named as: “WSS_Content_FormAtuhentication”.
3) Click on Membership tab. Check the following option.
i) aspnet_Membership_Fullaccess
Ii) aspnet_Personalization_FullAccess
Iii) aspent_Profile_FullAccess
Iv) aspnet_Roles_FullAccess
v) aspnet_WebEvent_FullAccess
4) Finally click on ” Ok ” Button.
Step 6 :We have to edit the web.config files of Security Token Service ( STS ) and our SharePoint Site.
Open the IIS Manager, Click on SharePoint Web Services node and then Right click on
SecurityTokenServiceAppplicationPool and select Explore.
Select the web.config file and open the file and add the following tags in web.config file.
<system.web>
<membership>
<providers>
<add connectionStringName=”ExtranetUsers” applicationName=”/” name=”Ext” type=”System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
</providers>
</membership>
<roleManager>
<providers>
<add connectionStringName=”ExtranetUsers” applicationName=”/” name=”ExtRole” type=”System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
</providers>
</roleManager>
</system.web>
<connectionStrings>
<add name=”ExtranetUsers” connectionString=”Data Source=NAJBSYS1;Initial Catalog=WSS_Content_FormAuthentication;Integrated Security=True” />
</connectionStrings>
Step 7 :
We have to edit the web.config file of our SharePoint Web Application Site.
<add connectionStringName=”ExtranetUsers” applicationName=”/” name=”Ext” type=”System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
<add connectionStringName=”ExtranetUsers” applicationName=”/” name=”ExtRole” type=”System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” />
<connectionStrings>
<add name=”ExtranetUsers” connectionString=”Data Source=NAJBSYS1;Initial Catalog=WSS_Content_FormAuthentication;Integrated Security=True” />
</connectionStrings>
<add key=”Ext” value=”%” />
See the screenshots below for placement area
We are all most done all the steps of our SharePoint Web Application site, Content Database and User membership
set up in the content database of the SharePoint.
Step 8:
Once we finish the form and submit, then the user will get a temporary password to he/she mail.
if you observe the table aspnet_Users in Contentdatabase we will see the newly added users.
Step 9:open Internet explorer Select the Form authentication
we will redirected to the login form
This is our form authentication Home page
Comments
Chandu Reddy
Excellent …,
Sreehari Inukollu
Thank you 🙂
Chandu Reddy
Hi sreehari how to do patching in production environment?
Sreehari Inukollu
Hi Chandu, I did not get a chance to apply the patches in production environment.
subha
Hey its good to see the article, i have the same requirement ,but i need to add nearly 2000 users to FBA. Any suggestions or tools to accomplish the task. Help is much appreciated.