2
votes

I have a SharePoint 2010 site that is configured for Forms Based Auth using custom role, membership and profile providers. This works perfectly using the OOTB SharePoint 2010 FBA form (ie. under /_forms in the web app virtual directory).

My problem is with a custom login form that is located in a separate folder, /Landing/Login/default.aspx. I've configured the web app to point to this form (contains an unmodified ASP.NET login control), which is rendered when the user hits the root URL. The problem comes when they submit their credentials and the form posts back for the redirection to /_layouts/Authenticate.aspx. It stops cold with a 403.

If I revert back to the OOTB FBA form (using the same providers) everything works fine. Any suggestions on what could be going wrong?

3

3 Answers

2
votes

So, I discovered the solution after examining the OOTB FBA login form that inherits from Microsoft.SharePoint.IdentityModel.Pages.FormsSignInPage and taking a look at the code with Reflector.

I modified my custom form to inherit from the same object and replicated the content placeholders (some I put into a panel control with the visibility set to false) from the OOTB Form.

Presto. My custom form now authenticates flawlessly. On reflection, this seems an obvious thing to do, just isn't documented anywhere.

1
votes

I just went through this process myself, and wrote up the steps I had to take to get FBA working with a custom login form. Hopefully it'll help the next poor soul that is trying to get this to work.

http://mikevallotton.wordpress.com/2010/10/18/sharepoint-2010-claims-authentication-custom-login-form-2/

0
votes

If you want to use ready-made solutions for the management of FBA users, you should take a look here:

http://www.devit.eu/products/121-fba-manager-sp2010-forms-based-authentication.aspx