Comments on: Configuring Forms Based Authentication in SharePoint 2016 and SharePoint 2019 – Part 2 – Editing the Web.Config Files https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/ Tips on .Net, SQL Server, Sharepoint & AI Wed, 05 Nov 2025 21:33:23 +0000 hourly 1 https://wordpress.org/?v=6.8.3 By: Chris Coulson https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-41591 Wed, 05 Nov 2025 21:33:23 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-41591 In reply to Pedro.

The security token service should definitely have a web.config – I’ve never seen it without one. It’s the security token service configuration that is used during login, so if that’s not configured correctly that will be causing your issues. You should be able to use IIS Providers screen for the security token service to see if the membership providers are showing as configured there.

]]>
By: Pedro https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-41590 Wed, 05 Nov 2025 19:34:30 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-41590 I found your article recently, very useful, thanks for sharing, I have a test farm, is subscription edition, only has 2 servers, WFE and APP, already configure the web.config files on the 2 servers, the WFE does not have the site of the CA and the security token does not have web.config, the APP server has all 3 and already edits them, when testing the access opens the site to log in, asks for the account but does not start, asks again repeatedly before sending error, already check that the connection strings and configurations are the same and have the correct data, What else could it be? , I thank you in advance for your support

]]>
By: Mahmood https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38977 Tue, 08 Aug 2023 07:57:06 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38977 In reply to Chris Coulson.

Hi Chris,
Thank you very much for your fast replies.
I have indeed configured both servers with the same configurations, going through this article. so both had the same configurations. however, I found the issue which seems to be strange to me.

I did the following:
1- Open IIS Manager.
2- Clicked on securityTokenServiceApplication -> features View -> Connection Strings.
3- Here I noticed that I have different Connection strings that are pointing to different server, once I fixed it everything worked fine.

I checked the web.config again and found that the connection strings have been added there.

Thank you so much for your time and effort.

]]>
By: Chris Coulson https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38976 Mon, 07 Aug 2023 22:35:39 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38976 In reply to Mahmood.

My guess is that something is configured differently in web1 than web2. Have you checked to make sure all of the .config file changes are the same? Are you sure that the connection string properly connects to the sql server from web1? Shouldn’t be, but is it possible that the app pool account is different between the two servers and only the web2 account has permissions to the fba database?

Another possibility is if you are using the encrypted password format instead of hashed (you should use hashed). The encrypted password format requires the same machine key values set on all servers.

]]>
By: Mahmood https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38975 Mon, 07 Aug 2023 19:40:39 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38975 Hi Chris,
Thank you for this amazing article. I have a multiple server environment and I did the FBA configuration on my WEB1 & WEB2 servers, but I’m facing an issue where FBA users are redirected to the login page repeatedly, and sometimes after getting redirected they would get an Error saying that the username/password are wrong.

I tried to turn off the WEB1 IIS and everything worked fine. but still I need both of them the stay up.

any thoughts?

]]>
By: Chris Coulson https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38904 Thu, 01 Jun 2023 17:30:58 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38904 In reply to Pragna patel.

Yeah, it should be fine in a multi server environment, as long as all the machine.config files and securetokenservice web.configs are all configured the same.

]]>
By: Pragna patel https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38903 Thu, 01 Jun 2023 14:49:30 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38903 In reply to Chris Coulson.

Thank you for quick reply.

Yes, I have made changes to SecureTokenService web.config as mentioned.
When I do the FBA configuration on my dev box with is single server environment it works just fine. The only difference on the staging environment is its multiple server architecture. I will double check my web.config though.

Here are few errors I find in ULS log.
SPSecurityContext: Request for security token failed with exception. 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, SPRequestSecurityTokenProperties properties)’.

SetupUserValidationType: Password not set. Defaulting to sign-in operation. Username:

An exception occurred when trying to issue security token: The security token username and password could not be validated..

]]>
By: Chris Coulson https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38902 Thu, 01 Jun 2023 14:29:34 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38902 In reply to pragna patel.

You don’t need to make the machine.config change on SQL Server, only on SharePoint servers.

As for the error, did you make the SecureTokenService web.config changes? If so, I think there’s some differences in the membership settings in that web.config and the machine.config.

]]>
By: pragna patel https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38901 Thu, 01 Jun 2023 14:13:01 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38901 Hi Chris,

I have a multiple server environment with 1 WEF, 1 APP, and 1 Sql server. As you mention in the blog we need to change the machine.config on all the environment. Is this applicable to sql server environment also?

When i try to login with FBA users i get below errors in ULS log though i used the hashed passwordFormat

STS Call: Failed to issue new security token. 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.).’.

Please advice
Regards

]]>
By: Chris Coulson https://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2016-sharepoint-2019-part-2-editing-the-web-config-files/#comment-38881 Wed, 30 Nov 2022 20:47:20 +0000 http://blogs.visigo.com/chriscoulson/?p=314#comment-38881 In reply to Steve Johns.

Hi Steve,

The tutorial still works, the only thing that has really changed is that to use it in Chrome you need to be accessing the site via https/ssl. But nothing to do with the above error.

That error just means that the FBA Pack can’t access the database specified in the config file/FBA Setup. I’d say 90% of the time it is due to a permissions issue. The database requests happen as the SharePoint app pool user, and that user doesn’t have permission to the DB. There’s information in Part 1 about assigning the proper permissions to the DB.

]]>