How to Configure Forms-based Authentication on SharePoint 2010 Using IIS7 – A Step By Step Guide

By Pritam
In .net
May 23rd, 2012
2 Comments
2326 Views
How to Configure Forms-based Authentication on SharePoint 2010 Using IIS7 - A Step By Step Guide

How to Configure Forms-based Authentication on SharePoint 2010 Using IIS7 – A Step By Step Guide

SharePoint, a business collaboration platform for the enterprise and the web, from MICROSOFT, which allow individuals in an organization to easily create and manage their own collaborative Web sites. SharePoint is typically associated with web content management and document management systems, but it is actually a much broader platform of web technologies, capable of being configured to suit a wide range of solution areas. SharePoint in itself is so huge that entire rack of books would be required to explain it. This post doesn’t talk about What SharePoint is but about one of the several Authentication Method supported by SharePoint, Forms based Authentication.

The following are the major Supported authentication methods :
  • Windows Authentication
  • Forms-based Authentication
  • SAML token-based authentication (new with SharePoint Server 2010)
In this article we will look how to configure Forms-based authentication on a SharePoint 2010 Web Application using IIS7. So without wasting time lets start to achieve our goal.
  1. Create a Web Application to use Forms-based authentication.
    • In the Central Administration, go to Manage Web Application.

      Forms Based Authentication

    • Click on New Button on Top left corner of the window. 

      Forms Based Authentication

    • A Create Web Application form will be popped which looks likes as follows. 
      Forms based Authentication

    • Change the Authentication Type to “Claims Based Authentication” from “Classic Mode Authentication” which is selected by default.
      Forms based Authentication

    • Give a port on which App will work. For this article we would creating our web application on port 30330. 
      Forms based Authentication

    • For “IIS Web Site”, “Security Configuration”, “Public URL” keep the default settings.
    • In Claims Authentication Types, check the Enable Form Based Authentication(FBA) 
      Enter “SqlProvider” in ASP.NET Membership provider name.
      Enter “SqlRoles” in ASP.NET Roles manager name.
      Please refer the below screenshot for point
      Forms based Authentication
    • In “Application Pool” section, select Predefined checkbox and select “Network Service” from drop down list.
      Forms based Authentication
       
    • Go at the bottom of the form and click OK.
    • If everything is fine then following confirmation message will come up. 
      Forms based Authentication

  2. Configure Connection string, Provider and Roles on Web App (Using IIS7).
    • Open IIS Manager (inetmgr).
    • Select your web App. 
      Forms based Authentication

    • Double click the Connection Strings(Squared Icon in above figure). Clicking onto that icon will open up the following screen. 
      Forms based Authentication

    • Click Add button on the top right corner of the window(Circled in the above image).This will open up 
      Forms based Authentication

    • Give a name to your connection string here in the Name field. Enter Server Name and Database as shown in the following screen. 
      Forms based Authentication

    • Click OK to add the connection string.
    • Now in left pane select your WebApp.
    • Double click .NET Users icon(Squared icon in the screenshot below). 
      Forms based Authentication

    • Double click the icon. A warning will prompt up saying the feature cannot be used as the default provider you are using is not a trusted one. Click OK to move on. The warning looks like as follows: 
      Forms based Authentication

    • After clicking on the OK button, the following screen will comes up. Click on the “Providers” button. 
      Forms based Authentication

    • Click on the “Add” button on the top right corner of the screen that comes up. This will pop up an “Add Provider” form as shown below. 
      Forms based Authentication

    • Add entries into this form as shown in the screen shot below : 
      Forms based Authentication

    • Click OK to add the Provider.
    • Go the drop down in the center top region of IIS Manager. (See below screen shot). 
      Forms based Authentication

    • Select .Net Roles from the drop down. The following screen will come up. Click “Add” button on the top right corner (Icon circled in the below screen shot). 
      Forms based Authentication

    • Clicking OK will launch a “Add Provider (role provider)” form as shown below. 
      Forms based Authentication

    • Fill in the entries as shown in the below screenshot. 
      Forms based Authentication

    • Click OK to add the Roles Provider string.
    • After this step we successfully added Connection string, Membership Provider and Role Provider entries into the web.config of our web application.
    • Forms based Authentication

      Screenshot 1

      Forms based Authentication

      Screenshot 2

      Repeat the steps for making entries of Connection string, Membership Provider and Role Provider in web.config of SharePoint central administration v4 (see Screen Shot 1 above) and SharePoint web services->SecurityTokenServiceApplication (see Screen Shot 2 above).

Write your queries and suggestions about the post. Your valuable feedback will help us to serve you all better. 

About the Author

- Co-Founder of IdleBrains, is software Engineer by profession with expertise in .NET technologies and data structures. An avid reader and writer, loves to keep himself well versed with new technologies. When not working can be found on Badminton court or chatting with friends. Among other hobbies, loves to listen old hindi numbers of Kishore Kumar and Mukesh.

2 Responses to “How to Configure Forms-based Authentication on SharePoint 2010 Using IIS7 – A Step By Step Guide”

  1. Tom says:

    Hello,

    Good tutorial but i have 1 problem.
    I have repeat this steps by: Central Administration and SecurityTokenServiceApplication

    If i login i got this error:

    Server Error in ‘/’ Application.
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a “web.config” configuration file located in the root directory of the current web application. This tag should then have its “mode” attribute set to “Off”.

    How to fix it? I’m Noobie 🙂 Thanks!

  2. Merin says:

    Is this a complete tutorial? Why do you skip steps when you say it is step by step guide? Where is the screen shot or steps that shows a FBA user successfully logged in???

Leave a Reply

Your email address will not be published. Required fields are marked *

facebook comments: