Forms authentication in SharePoint using custom membership & role providers

Posted: June 22, 2010 in Forms Authentication

Here are some great PDF’s having step by step explanations to implement forms authentication in SharePoint where you will be using your own database with custom schema.

Part 1

Part 2

Part 3

Part 4

Part 1 & 2 is enough for implementing custom membership provider. In case you wish to create a custom role provider you can check part 3 & 4.

PS : PDF’s are not created by me & are from internet. Content provided as is.

Advertisements
Comments
  1. Tiklu Ganguly says:

    Thanks Chanakya for the nice set of pdfs 🙂

  2. Sachin says:

    Hi chanakya
    these are nice articles i must say.But even after following i am stuck with an issue.Let me first tell you what am i trying to achieve.

    1.We have a a site (port 80) with custom pages on a sharepoint 2007 .
    2.Current it has a windows authentication and it works fine.It also has share point users already created in various roles.
    3.Now we want to have custom authentication process for this site only.
    4.So we created a cutom membership provider and added authentication logic to it for validate user method.No other method is implemented.
    5.Changed the web.config of site 80 and central admin website to reflect membership provider.
    6.what i am failing is at adding user something like MembershipProvider:User to the site.Moreover i dont want to do it atall. as i said earlier we already have users and we dont want to chage it.
    7.We silently want to add a authentication mechanism.
    8.How will user like Membershipprovider:User ever get resolved when its never present.In your article you resolved a user names demo.I want to know who create this user on sharepoint and how does it get resolve as MembershipProvider:User
    9.Please help us as we are stuck with this for couple of weeks now,and my knopwledge of sharepoint is very average.

    • Hi Sachin,

      The users for the custom authentication comes from a back end DB like SQL. The column names also has to match as in the code you are writing. Also you should implement more than 1 method not just only one for authenticating users. Methods like GetAllUsers, GetUSer, etc has to be implemented..

  3. Sachin says:

    Thanks chanakya for replying.
    As you mentioned i realized my mistake and implemented the necessary methods in Custom Membership provider.I also updated the people picker wild cards in central web.config.I am even able to see the query being fired on sql using profiler when we try to resolve user using people picker while adding site collection administrator, but it does not get resolved.As a result i cannot add a user e.g Membershipprovider:UserName.Still stuck.
    Any suggestions.

    Regards
    Sachin

  4. Tapan says:

    hi chanakya these links are not working can u mail me all the PDFs..?

    Part 1
    Part 2
    Part 3
    Part 4

  5. paras says:

    hi Chankya , Its very useful tutorial Thank u

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s