Moved FBA from SharePoint 2010 to 2016


#1

I have created a new SharePoint 2016 environment and enabled FBA using your FBA Pack.
I copied the aspnetdb database from the original server to the new sql server and configured the new server in the same way. I have tested the connection to the new sql server using a udl file and it can make a connection.
When I attempt to connect to SharePoint using the same credentials as before, it simply says that it cannot log me in.
If I click on the Forgot password link and it is supposed to open the forgot password page, it simply comes back to the login page. Likely because I do not have access until I log on.

I have been messing with this for a few weeks on and off trying to get it to work. I have edited and changed the configuration file trying other settings. Made sure the settings are the same across the app and wfe servers. as well as machine.config and the web.config in the SecurityTokenServiceApplication.
I’m at a loss. I ended up removing the link to Forgot password page in the login page because it doesn’t work. But there is no way to reset the password now. When I go to the Settings for a site and try to access the “FBA User Management” I get the error:

A Membership Provider has not been configured correctly. Check the web.config setttings for this web application.


#2

That error message means something is not setup properly. A lot of the time it’s permissions to the database. Make sure that the app pool user that the SharePoint web app and Security Token Service run as has dbo permissions to the aspnetdb database.


#3

Yes. I’ve been checking every possibility around this. I gave dbo access to every account that we use in SharePoint in case some other account is trying to read the database. I’ve tried running the SQL Profiler. I saw some accounts accessing the SQL Server, but they all had access. But I could not tell if any were trying to access aspnetdb database. I’m not a SQL Profiler expert.


#4

I decided to go through the entire setup again on a SP 2016 environment that I have in a VM that I have never tried configuring FBA before. I went through the instructions and used the config files exactly as documented (copy paste) and I created a new aspnetdb database.
When I click on the Manage Forms Based Authentication Users
I get the error:
A Membership Provider has not been configured correctly. Check the web.config setttings for this web application.

So, maybe I made the same mistake as before. But I went through the steps carefully step by step. What am I doing wrong?


#5

My guess is that it’s still the app pool user not having permissions to the database. Find the user the app pool is running as in IIS and make sure that user is added to sql server and has been given db owner permissions on the aspnetdb database.

If you’re still having problems you should be able to test this in iis. First check the providers page in iis for the SharePoint web application you’ve been trying to configure. Set the dropdown to ‘.Net Users’ and your membership provider you configured should be showing (If it’s not then something hasn’t been configured properly with the membership provider). If your membership provider is listed, open the ‘.Net Users’ page in iis. At first it will give you an error, this is because the default provider is an unsupported SharePoint provider. You’ll have to change the default provider to the one you configured (option is on right hand menu). If everything is configured properly (including the database) you’ll be able to create new users from this interface and list existing users. Essentially it will let you see if you configuration is correct or not. After checking this, be sure to change the default provider back to what it was (I believe the default is called ‘i’), or SharePoint will not work with your membership provider.


#6

Seems that my other responses did not go through.

After going through your suggestions, I received an error when trying to set the default provider to my provider.
At first it gave me the error:

There was an error while performing this operation
Details:
Keyword not supported: ‘provider’.

That made me check my config file and I found that my connectionsring was the only place I had the ‘provider’ keyword. I changed my connectionstring setting. After a few setting changes in IIS, it all started working!

It was late and I haven’t gotten back to test other areas yet. Like the ‘forgot my password’ page. But I can now log in.

Thanks


#7

Great to hear you got it going!