views:

70

answers:

1

I've found this article on MSDN. It describes how you can write your custom login page and a membersip provider for a SharePoint website to manage access to the website the way you want.
I'm wondering: would it be possible to only add this custom login page, without specifying a membership provider? If I authenticate the user on the login page by calling FormsAuthentication.SetAuthCookie(), wouldn't it be enough?
I don't really understand how it is working that's why i'm asking these questions and i don't want to start implementing custom membership provider if i don't need one.

A: 

If you want to use Forms-Based Authentication (FBA), you will need to specify a membership provider. However, rather than implement your own I would suggest using (or extending) an existing one. The most common is the SqlMembershipProvider, which ships with ASP.NET 2.0:

How To: Use Forms Authentication with SQL Server in ASP.NET 2.0

There is also a CodePlex project that stores membership/profile data in SharePoint lists:

SharePoint 2007 List Membership Provider

dahlbyk
what will happen if i don't include membership element in my cofig file?
agnieszka
because i don't need storing this data, i just need to authenticate my users. and i know i've used forms authentication previously without including any membership information in config file. Did it use some default authentication then?
agnieszka
not in sharepoint though
agnieszka
I assume you're referring to a credentials element: http://msdn.microsoft.com/en-us/library/e01fc50a.aspxI'm not aware of any restriction in SharePoint that would prevent you from using that, though it would not be considered a best practice.
dahlbyk