This project has moved and is read-only. For the latest updates, please go here.

Custom Membership Provider Issue!

May 14, 2014 at 8:23 PM
I'm working on creating a custom membership provider and I'm trying to use it with the FBA Pack.
I have added the custom membership provider dll to GAC and would like to use it in the FBA Pack.
When I try to create a new user using the FBA Pack interface I'm getting a 'Provider Error' when the Utils.BaseMembershipProvider().CreateUser is called.

Am I missing some step here?
May 15, 2014 at 2:57 AM
It should work as long as you properly implement all of the membership provider functions. I suggest you step through it with the debugger to see what's going on.
May 15, 2014 at 5:33 AM
Well, I'm not implementing all the functions, just the ones I need.
If I test my custom provider with a test project where I'm adding the login control and create user control manually it works fine.
As soon as I try to test the same thing in FBA tool it gives me provider error.
Is there a place I can see what exactly the error could be. I checked the ULS logs but nothing conclusive. Anything specific I should look for in the logs?
thanks for your time.
May 15, 2014 at 2:02 PM
Not really...it's really tough to say without knowing your membership provider. My guess is that something unexpected is being returned from the provider. I think your best bet is to attach the debugger to SharePoint. Try it against both the FBA Pack source and your membership provider source, and i'm sure you'll get to the base of the problem.
May 15, 2014 at 6:54 PM
Looks like I might have found the issue. Its an permission issue with the SQL Server. I'm using the default createuser method from SQL Membership provider which works fine.
I have created another table to store the password history. An insert to that table fails due to some permissions issue.
What's the recommendation for credentials to be used for these types of custom methods?
May 15, 2014 at 7:29 PM
I usually give the user that SharePoint connects with 'DBOwner' privileges - so that db user will have permissions to do whatever they like on the database.
May 16, 2014 at 6:49 PM
I tried to create new user using custom membership model and it works good for store history of passwords. But while login in as fba user, i am recieving "invalid user name or password" error. Is it possible to debug on login(default.aspx)?
May 16, 2014 at 7:42 PM
Sure - debug your membership provider code. Just set a breakpoint in it and attach it to the SharePoint process.
May 19, 2014 at 5:37 PM
Edited May 19, 2014 at 6:13 PM
How we can replace the new login page other than Default.aspx
May 20, 2014 at 2:58 AM
I usually just take a copy of the default login page, and apply changes to it. Then in central admin you can set a custom login page url for the web application.