0

I realized a custom FBA provider and I registered on 3 web.config (Central Admin, STS and WebApplication).

I double-checked several times and configurations are all correct and equals. I have modified the PeoplePickerWildcards

On central admin under Web Application settings I can search and add FBA users, I can add user Full Control permission on Web Application.

I have realized a small C# application that adds / synchronizes FBA users in the user profile and in the user profile I can see the FBA users.

On Web Application I can login without problem as both FBA and AD.

The problem is that when I login on Web Application in people picker I can't see the FBA users but only those of AD.

Here the web.config of the STS

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  </configSections>
  <system.serviceModel>

    <!-- Behavior List: -->
    <behaviors>
      <serviceBehaviors>
        <behavior name="SecurityTokenServiceBehavior" >
          <!-- The serviceMetadata behavior allows one to enable metadata (endpoints, bindings, services) publishing.
               This configuration enables publishing of such data over HTTP GET.
               This does not include metadata about the STS itself such as Claim Types, Keys and other elements to establish a trust.
          -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- Default WCF throttling limits are too low -->
          <serviceThrottling maxConcurrentCalls="65536" maxConcurrentSessions="65536" maxConcurrentInstances="65536" />

        </behavior>
        <behavior name="ApplicationSecurityTokenServiceBehavior" >
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
          <serviceThrottling maxConcurrentCalls="65536" maxConcurrentSessions="65536" maxConcurrentInstances="65536" />

        </behavior>
      </serviceBehaviors>
    </behaviors>

    <!-- Service List: -->
    <services>
      <service name="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract"     
               behaviorConfiguration="SecurityTokenServiceBehavior" >
        <!-- This is the HTTP endpoint that supports clients requesing tokens. This endpoint uses the default 
             standard ws2007HttpBinding which requires that clients authenticate using their Windows credentials. -->
        <endpoint
          address=""
          binding="customBinding"
          bindingConfiguration="spStsBinding"
          contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract" />

        <!-- This is the HTTP endpoint that supports clients requesting service tokens. -->
        <endpoint
          name ="ActAs"
          address="actas"
          binding="customBinding"
          bindingConfiguration="spStsActAsBinding"
          contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract" />

        <!-- This is the HTTP endpoint that supports IMetadataExchange. -->
        <endpoint address="mex"
                  binding="mexHttpBinding"
                  contract="IMetadataExchange" />
      </service>
      <service
        name="Microsoft.SharePoint.IdentityModel.ApplicationSecurityTokenService"
        behaviorConfiguration="ApplicationSecurityTokenServiceBehavior">
        <endpoint
          name="app"
          address=""
          binding="customBinding"
          bindingConfiguration="spStsApplicationBinding"
          contract="Microsoft.SharePoint.IdentityServices.IApplicationSecurityTokenServiceContract" />
      </service>
      <service name="Microsoft.SharePoint.Administration.Claims.SPWindowsTokenCacheService">
        <endpoint address=""
                  binding="customBinding"
                  bindingConfiguration="SPWindowsTokenCacheServiceHttpsBinding"
                  contract="Microsoft.SharePoint.Administration.Claims.ISPWindowsTokenCacheServiceContract" />
      </service>
    </services>

    <!-- Binding List: -->
    <bindings>
      <customBinding>
        <binding
          name="spStsBinding">
          <binaryMessageEncoding>
            <readerQuotas
              maxStringContentLength="1048576"
              maxArrayLength="2097152"/>
          </binaryMessageEncoding>
          <httpTransport
            maxReceivedMessageSize="2162688"
            authenticationScheme="Negotiate"
            useDefaultWebProxy="false" />
        </binding>
        <binding
          name="spStsActAsBinding">
          <security
            authenticationMode="SspiNegotiatedOverTransport"
            allowInsecureTransport="true"
            defaultAlgorithmSuite="Basic256Sha256"
            messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12" />
          <binaryMessageEncoding>
            <readerQuotas
              maxStringContentLength="1048576"
              maxArrayLength="2097152"/>
          </binaryMessageEncoding>
          <httpTransport
            maxReceivedMessageSize="2162688"
            authenticationScheme="Negotiate"
            useDefaultWebProxy="false"/>
        </binding>
        <binding
          name="spStsApplicationBinding">
          <binaryMessageEncoding>
            <readerQuotas
              maxStringContentLength="1048576"
              maxArrayLength="2097152" />
          </binaryMessageEncoding>
          <namedPipeTransport
            maxPendingAccepts="250"
            maxPendingConnections="250"
            maxReceivedMessageSize="2162688">
            <connectionPoolSettings
              idleTimeout="00:30:00"
              maxOutboundConnectionsPerEndpoint="250"/>
          </namedPipeTransport>
        </binding>
        <binding name="SPWindowsTokenCacheServiceHttpsBinding">
          <security
            authenticationMode="IssuedTokenOverTransport"
            defaultAlgorithmSuite="Basic256Sha256" />
          <textMessageEncoding>
            <readerQuotas maxStringContentLength="1048576" maxArrayLength="2097152"/>
          </textMessageEncoding>
          <httpsTransport maxReceivedMessageSize="2162688" authenticationScheme="Anonymous" useDefaultWebProxy="false" />
        </binding>
      </customBinding>
    </bindings>
  </system.serviceModel>

  <system.webServer>
    <security>
      <authentication>
        <anonymousAuthentication enabled="true" />
        <windowsAuthentication enabled="true">
          <providers>
            <clear />
            <add value="Negotiate" />
            <add value="NTLM" />
          </providers>
        </windowsAuthentication>
      </authentication>
    </security>
    <modules>
      <add name="WindowsAuthenticationModule" />
    </modules>
  </system.webServer>
  <system.net>
    <connectionManagement>
      <clear />
      <add address="*" maxconnection="10000" />
    </connectionManagement>
  </system.net>
   <system.web>
    <membership>
      <providers>
        <add name="ThinkBI.Members" type="ThinkBI.Sharepoint.FBA.Provider.Models.Members, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" connectionStringName="MyContext" applicationName="ThinkBI" serviceUrl="http://myauthenticationservice/login" />
      </providers>
    </membership>
    <roleManager>
      <providers>
        <add name="ThinkBI.Roles" type="ThinkBI.Sharepoint.FBA.Provider.Models.Roles, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" applicationName="ThinkBI" connectionStringName="MyContext" />
      </providers>
    </roleManager>
  </system.web> 


  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    </providers>
  </entityFramework>

   <connectionStrings>
    <add name="MyContext" connectionString="data source=DB01;initial catalog=users;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
  </connectionStrings>
   <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Here the WebApplication (Only the modified tags)

    <PeoplePickerWildcards>
      <clear />
      <add key="AspNetSqlMembershipProvider" value="%" />
      <add key="ThinkBI.Members" value="%" />
    </PeoplePickerWildcards>

    <membership defaultProvider="i">
      <providers>
        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ThinkBI.Members" type="ThinkBI.Sharepoint.FBA.Provider.Models.Members, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" connectionStringName="MyContext" applicationName="ThinkBI" serviceUrl="http://myauthenticationservice/login" />
      </providers>
    </membership>
    <roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">
      <providers>
        <add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
        <add name="ThinkBI.Roles" type="ThinkBI.Sharepoint.FBA.Provider.Models.Roles, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" applicationName="ThinkBI" connectionStringName="MyContext" />
      </providers>
    </roleManager>


  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </providers>
  </entityFramework>
  <connectionStrings>
    <add name="MyContext" connectionString="data source=DB01;initial catalog=users;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
  </connectionStrings>

Here the Central Admin web.config (Only the modified / added tags)

    <PeoplePickerWildcards>
      <clear />
      <add key="AspNetSqlMembershipProvider" value="%" />
      <add key="ThinkBI.Members" value="%" />
    </PeoplePickerWildcards>

    <roleManager>
      <providers>
        <add name="ThinkBI.Roles" type="ThinkBI.Sharepoint.FBA.Provider.Models.Roles, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" applicationName="ThinkBI" connectionStringName="MyContext" />
      </providers>
    </roleManager>
    <membership>
      <providers>
        <add name="ThinkBI.Members" type="ThinkBI.Sharepoint.FBA.Provider.Models.Members, ThinkBI.Sharepoint.FBA.Provider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=55bfc8ef2dcc12dd" connectionStringName="MyContext" applicationName="ThinkBI" serviceUrl="http://myauthenticationservice/login" />
      </providers>
    </membership>




  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    </providers>
  </entityFramework>
  <connectionStrings>
    <add name="MyContext" connectionString="data source=DB01;initial catalog=users;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
  </connectionStrings>
</configuration>

Here the FULL Central Admin web.config

Here the FULL STS web.config

Here the FULL Web Application web.config

  • Is it not showing in search or not in auto complete box? – love thakker Jan 7 '17 at 13:45
  • Have You added People Picker Wildcard key in extranet web.config? <PeoplePickerWildcards> <clear /> <add key="AspNetSqlMembershipProvider" value="%" /> </PeoplePickerWildcards> – Gennady G Jan 7 '17 at 14:22
  • Not showing in search and completebox, I have added the PeoplePickerWildcards – Max Jan 7 '17 at 15:19
  • You need to provide the complete custom config you've made to the Web Application web.config as well as the STS web.config. Please edit your post with those. – Trevor Seward Jan 8 '17 at 4:05
0

Solved!

I noticed that the user who comes to SQL is IUSR, having the DB on another server I set up a connection via SQL authentication and I solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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