1

I come back with another problem on another new fresh install : 1 SQL Server, 2 WFE. And I still have the problem 'Membership provider etc'. (Come back because I had the problem here).

Now I understand things a little bit better, I followed this, and everything's fine, except this error.

STS AppPool run with 'sp_farm' and MyApp with 'sp_pool'.

On SQL Side, 'sp_pool' owned schemas full access, and 'sp_farm' membership db_owner, on my Extranet_User_DB. Also, in general security/login in SQL, 'sp_farm' is mapped to be dbo on the database (same for 'sp_pool').

I used FBAConfigMgr to set the web.config, I check them and they seem fine. I double check them, they all have connectionString ok, etc.

Should I still create the IIS 'blank site' ? Or this is not needed anymore ?

(Should I Just edit my precedent post ?) TIA

I have to say that I would like to avoid using the "machine.config". But when I look at the machine.config located in : "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config"

I can see that in I have :

add name="LocalSqlServer"

And

<membership>
    <providers>
        <add name="AspNetSqlMembershipProvider"

Should I modify this machine.config to match my SQL_Role and SQL_Membership plus my SQL-SERVER ?

I investigate a little bit more. If I go to IIS -> WebApp website, If I try adding a .NET users, it says that default provider is not a trusted provider... when Trusted_Connection=true is present in connection strings. I guess the problem is coming from here.

Idea to troubleshoot this error ?

EDIT : I got this in my web.config ... the &#xD;&#xA is normal ?

<roleManager>
  <providers>
    <add connectionStringName="fbaSQL" applicationName="/" name="SQL_Role" type="System.Web.Security.SqlRoleProvider, System.Web, &#xD;&#xA;Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </providers>
</roleManager>

Woh ... I can delete it from CA and STS web.config, and all still working. But If I delete it from WebApp web.config, the site of the app doesn't respond anymore (got a blank page).

Ok ... So &#xD;&#xA is the carriage return, bad interpreted by XML. So I get rid of it, and now my site respond without this. But Still membership error.

  • This site and the 'official' one provide two different web.config syntax ... Which one is good ? if they're not both ...
1

Looks like there's a couple of questions here:

  • Should I still create the IIS 'blank site' ? Or this is not needed anymore ?

The IIS blank site is just to be able to populate the aspnetdb with users. You could alternatively use the FBA Pack to add users to the membership database.

  • Should I modify this machine.config to match my SQL_Role and SQL_Membership plus my SQL-SERVER ?

If you already added the entries to your web application web.config, do not also add them to your machine.config - you will have errors because of duplication. The reason to use the machine.config is so that you do not have to edit the web app web.config each time you create a new web app. If you do use the machine.config, ADD your new entries - don't overwrite the existing entries. They may already be used by some other .net application on the machine.

  • I go to IIS -> WebApp website, If I try adding a .NET users, it says that default provider is not a trusted provider...

It will always say that - the default membership provider for a SharePoint web application is a SharePoint membership provider (which acts like a proxy to the fba membership provider) - which is not compatible with IIS. Which is why I suggest you use a seperate web site to test the settings in iis, not your current web app. If you want to test the SharePoint web app in IIS, you have to change the default membership provider to your fba membership provider, and then remember to change it back to the SharePoint provider when you're done.

  • Thanks for this nice answer @ChrisCoulson. Can you provide me steps to troubleshoot the 'A membership has not been configured...' ? Cause I double check all web.config, and its all good (and I use FBAConfig Manager.exe). Thanks – Nico Aug 25 '14 at 6:08
  • PS : I updated my answer – Nico Aug 25 '14 at 6:29
0

Ok, found the problem. In web.config files, I need to add the sql instance.

From :

  <connectionStrings>
    <add name="fbaSQL" connectionString="server=SQLSERVER;database=MyDB;Trusted_Connection=true" />
  </connectionStrings>

To :

  <connectionStrings>
    <add name="fbaSQL" connectionString="server=SQLSERVER\INSTANCE;database=MyDB;Trusted_Connection=true" />

*

Please note the SQLSERVER\INSTANCE

Now, I'm able to manage sql users from SharePoint. New problem is taht I can't login with them, saying that The server could not sign you in

SOLVED :

Oh my god ... found the problem ... My bad. I have 2 SP Server, both STS web.config files need to be edited ...

  • 1
    If you can't sign in with them, ensure that your Security Token Service web.config has matching membership / connection string entries as your web application web.config. – Chris Coulson Aug 25 '14 at 12:44
  • Does the STS web.config should have "i" and "c" as membership/role providers ? and should I set my role provider as defaultProvider in STS ? and should machineKey node be present in STS web.config ? – Nico Aug 25 '14 at 12:45
  • I just double check, the conf files, of STS and WebApp. They are exactly the same ... – Nico Aug 25 '14 at 12:56
  • No, you just put YOUR membership and role providers, not the 'i' and 'c' SharePoint proxy providers. See the example here: blogs.visigo.com/chriscoulson/… – Chris Coulson Aug 25 '14 at 16:24

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.