1

I want to implement forms based authentication for a sharepoint portal. I have used the standard ASP.NET membership provider database for test purpose and it work fine.

My client has Authentication details on their own SQL Database and I want to implement FBA that uses the custom database to authenticate users.

Does any one have any suggestions on how to implement this. Do I need to write a custom authentication provider?

1

If the schema of custom DB is same as aspnetDB, You can use the same provider with relevant connectionString in the central admin and the web application config.You can provide userid\pwd in the connectionString as below:

<connectionStrings>
  <add name="MySqlConnection" connectionString="Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername; Password=myPassword;" />
</connectionStrings>
<system.web>
...
  <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
    <providers>
      <clear />
      <add 
        name="SqlProvider" 
        type="System.Web.Security.SqlMembershipProvider" 
        connectionStringName="MySqlConnection"
        applicationName="MyApplication"
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        requiresUniqueEmail="true"
        passwordFormat="Hashed" />
    </providers>
  </membership>
3

Have a look at SharePoint 2010 FBA Pack:

http://sharepoint2010fba.codeplex.com/

A forms based authentication pack for SharePoint 2010. It includes web parts for registering users, changing passwords and password recovery. It includes tools for managing users and roles and for approving registrations.

0

I suggest you create you own MembershipProvider implementation since you are not going to use the default FBA database, but a custom database instead. It is not such a difficult to implement your own. check out these link http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx

  • Creating custom membership is tricky. On the paper seems easy, but you really need to know what you do. But that's the way you should follow. – trip Feb 24 '12 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.