SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having difficulty setting up Sharepoint Foundation 2013 to use forms-based authentication with an external LDAP provider.

I have followed the instructions here:

After editing the central admin and SecurityToken web.config files, everything is still working fine and I can access both CA and the webapp's sign-in. As soon as I edit my webapp's web.config, the webapp site stops loading. I've made several tweaks to the web.config to try and troubleshoot, all to no avail - I either get a "Sorry..." message with no details, or:

Server Error in '/' Application.

Common Language Runtime detected an invalid program. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidProgramException: Common Language Runtime detected an invalid program.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: [InvalidProgramException: Common Language Runtime detected an invalid program.] System.Web.Security.Roles.Initialize() +1093 System.Web.Security.RoleManagerModule.OnLeave(Object source, EventArgs eventArgs) +73 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +183

Any ideas?

share|improve this question
up vote 1 down vote accepted

To mirror the TechNet thread, see The LdapMembershipProvider and LdapRoleProvider classes exist in Foundation 2013, but their methods have no logic in them and you'll have to develop your own provider.

share|improve this answer
The link is out of date... – Shaamaan Jul 27 '15 at 8:20
Updated @Shaamaan – Trevor Seward Jul 27 '15 at 13:45
Much obliged. :) – Shaamaan Jul 27 '15 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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