none
Getting Error after modifying web.config

    Question

  • Im now getting an error after I modified my web.config files for STS, Central Administration, and my new web application.
    I followed the instructions http://blogs.technet.com/b/mahesm/archive/2010/04/07/configure-forms-based-authentication-fba-with-sharepoint-2010.aspx
    and now I get the following error, (I used my database server, and my database name - generated at the time I made the new web application)
    I've also built a collection site at this new web application.

    /////////////////////////// ERROR DETAILS //////////////////////////////////////////

    <fieldset>

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

    </fieldset>
    <fieldset><legend>Detailed Error Information</legend>
    Module IIS Web Core
    Notification Unknown
    Handler Not yet determined
    Error Code 0x80070032
    Config Error The configuration section 'roleManager' cannot be read because it is missing a section declaration
    Config File \\?\C:\inetpub\wwwroot\wss\VirtualDirectories\44937\web.config
    Requested URL http://issuetracker:44937/_admin/WebApplicationList.aspx
    Physical Path  
    Logon Method Not yet determined
    Logon User Not yet determined
    </fieldset>
    <fieldset><legend>Config Source</legend>
     369: 
     370: <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false"> 
     371: 
    
    </fieldset>
    Any Help Greatly appriciated.

    Thanks,
    Mike
    lundi 14 février 2011 21:00

Réponses

  • From what I can tell from your config, it should look like this (note where system.web is):

     

    </SharePoint>
    <connectionStrings>

    <add name="SQLConnectionString" connectionString="data source=IssueTracker\SharePoint;Integrated Security=SSPI;Initial Catalog=WSS_Content_6161fc9bffea49d09cc15e86831d4aef" />

    </connectionStrings>

     

    <system.web>

    <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">

    <providers>

    <add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

    <membership defaultProvider="SQL-MembershipProvider">

    <providers>

    <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </membership> 


    Doug Hemminger http://www.sharepointdoug.com
    • Marqué comme réponse tapius mardi 15 février 2011 16:09
    mardi 15 février 2011 15:37

Toutes les réponses

  • it is having an issue with your roleManager config in Web.config,  Where did you place those lines?

     

    added after </SharePoint> and Before <system.web>

     

    can you paste in that section of the config?

    lundi 14 février 2011 22:43
  • <connectionStrings>

    <add name="SQLConnectionString" connectionString="data source=IssueTracker\SharePoint;Integrated Security=SSPI;Initial Catalog=WSS_Content_6161fc9bffea49d09cc15e86831d4aef" /> (this is the db that got generated when i made my claims/forms based authentication)

    </connectionStrings>

    <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">

    <providers>

    <add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

    <membership defaultProvider="SQL-MembershipProvider">

    <providers>

    <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </membership>

    mardi 15 février 2011 14:48
  • The connection string gets added after </SharePoint> and Before <system.web> but the providers have to be withing the <system.web>. It is erroring because it sees the roleManager as it's own section (because it's not within system.web) and thinks it needs a declaration.
    Doug Hemminger http://www.sharepointdoug.com
    mardi 15 février 2011 15:16
  •   </SharePoint>
    <connectionStrings>

    <add name="SQLConnectionString" connectionString="data source=IssueTracker\SharePoint;Integrated Security=SSPI;Initial Catalog=WSS_Content_6161fc9bffea49d09cc15e86831d4aef" />

    </connectionStrings>

    <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">

    <providers>

    <add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

    <membership defaultProvider="SQL-MembershipProvider">

    <providers>

    <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </membership> 

      <system.web>

    It is before system.web
    Should it be after system.web?

    mardi 15 février 2011 15:33
  • From what I can tell from your config, it should look like this (note where system.web is):

     

    </SharePoint>
    <connectionStrings>

    <add name="SQLConnectionString" connectionString="data source=IssueTracker\SharePoint;Integrated Security=SSPI;Initial Catalog=WSS_Content_6161fc9bffea49d09cc15e86831d4aef" />

    </connectionStrings>

     

    <system.web>

    <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">

    <providers>

    <add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </roleManager>

    <membership defaultProvider="SQL-MembershipProvider">

    <providers>

    <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

    </providers>

    </membership> 


    Doug Hemminger http://www.sharepointdoug.com
    • Marqué comme réponse tapius mardi 15 février 2011 16:09
    mardi 15 février 2011 15:37
  • I also found problems with getting this configured, and was getting an error message similar to "error in web.config as the Role Manager is already defined". I fixed this by replacing the code before </system.web> as follows:  

    REPLACE:

    <roleManager>
          <providers>
          </providers>
        </roleManager>
        <membership>
          <providers>
          </providers>
        </membership>
      </system.web>

    WITH:

    <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">
    <providers>
    <add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </providers>
    </roleManager>
    <membership defaultProvider="SQL-MembershipProvider">
    <providers>
    <add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </providers>
    </membership>
      </system.web>

    Also, make sure the following are correct:

    name="SQL-RoleManager"

    name="SQL-MembershipProvider"

    -------------------------------------------------------------------

    Pritin Patel


    • Modifié PritinP dimanche 17 juin 2012 00:47
    dimanche 17 juin 2012 00:46