3

I setup SharePoint 2010 FBA using ASP Net Membership database following the article: Step by Step Guide to Configure SharePoint 2010 Forms Based Authentication with SQL.

I configured all web.config files of Central Admin, External Site, SecurityToken Web Service on the WFEs in sections: ConnectionStrings, PeoplePickerWildcards, RoleManagers, and MembershipProviders. The default providers all seem to be setup correctly because I can see users in the People Picker. I also ensured FBAService account has access to the membership database.

I am able to log-in to the external site using Windows Authentication (see image below) but with Forms Authentication I keep getting error (also see image directly below):

The server could not sign you in. Make sure your user name and password are correct, and then try again.

I've spent over a week troubleshooting this, sometimes starting over completely from scratch!

One thing I found interesting is if I set the defaultProvider to "i" and "c" for the external site, I can't manage users in IIS! However, when I set it to "ExternalMembershipProvider" and "ExternalRoleManager" I can!!

I also tried SQL Profiler but didn't see anything that stood out. Hmmm... I'm seeing this in the logs...

09/07/2012 20:08:25.14  w3wp.exe (0x3084)                           0x1218  SharePoint Foundation           Claims Authentication           0000    Unexpected  Password check on 'admin' generated exception: 'System.ServiceModel.FaultException`1[Microsoft.IdentityModel.Tokens.FailedAuthenticationException]: The security token username and password could not be validated. (Fault Detail is equal to Microsoft.IdentityModel.Tokens.FailedAuthenticationException: The security token username and password could not be validated.).'.    
09/07/2012 20:08:25.14  w3wp.exe (0x3084)                           0x1218  SharePoint Foundation           Claims Authentication           fo1t    Monitorable SPSecurityTokenService.Issue() failed: System.ServiceModel.FaultException`1[Microsoft.IdentityModel.Tokens.FailedAuthenticationException]: The security token username and password could not be validated. (Fault Detail is equal to Microsoft.IdentityModel.Tokens.FailedAuthenticationException: The security token username and password could not be validated.).   
09/07/2012 20:08:25.14  w3wp.exe (0x17B0)                           0x3BBC  SharePoint Foundation           Claims Authentication           fsq7    High        Request for security token failed with exception: System.ServiceModel.FaultException: The security token username and password could not be validated.     at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response)     at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)     at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst)     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo)  eaf3b387-bcd4-4ad0-956b-9f7ce24b5681
09/07/2012 20:08:25.14  w3wp.exe (0x17B0)                           0x3BBC  SharePoint Foundation           Claims Authentication           8306    Critical    An exception occurred when trying to issue security token: The security token username and password could not be validated..    eaf3b387-bcd4-4ad0-956b-9f7ce24b5681

enter image description here

enter image description here

4
  • AFAIK the default provide should not be set to anything other than i and c for any site, and you should use FBA Authentication pack(http://sharepoint2010fba.codeplex.com/documentation) to manage the users.Additionally , check your settings with the following http://blogs.technet.com/b/mahesm/archive/2010/04/07/configure-forms-based-authentication-fba-with-sharepoint-2010.aspx. Another useful link is http://donalconlon.wordpress.com/2010/02/23/configuring-forms-base-authentication-for-sharepoint-2010-using-iis7/ Sep 8, 2012 at 8:08
  • If you can't use a third party tool to manage your FBA users, what I tend to do is to create a new, empty application in IIS, hook up the FBA Membership and Role providers, and use that application to manage the users.
    – James Love
    Sep 9, 2012 at 9:16
  • @JamesLove thanks! I have been using this one: sp2010fba.codeplex.com and it works great!
    – pixelbobby
    Sep 9, 2012 at 14:04
  • Neat, will check it out
    – James Love
    Sep 9, 2012 at 17:23

1 Answer 1

1

Okay so I figured it out and I would love to save anyone from this headache. I opened all mentioned web.config's on both WFEs and had to make sure the <machineKey> generated was the exact same. Everything else was perfect.

Also, since you're here let me tell you that this FBA Management Tool here works great!!

http://sp2010fba.codeplex.com/

Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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