Role Provider error after configuration v1.21

Oct 24, 2011 at 4:31 PM
Edited Oct 24, 2011 at 4:35 PM

After we perform the configuration wizard steps, confirm the DB roles, etc., I note two things and end with an error I haven't figured out. First, the AddUsers.SQL statement results in an error.

1. This line - [uManage-family].[dbo].[aspnet_UsersInRoles_AddUsersToRoles] Results in failure. If I modify it to be:



...the query executes properly with several "X rows Affected" results


 2. Once the above is performed and the rest of the setup steps are completed (including turning off the wizard in web.config), we get this error:
Server Error in '/' Application.
The Role Manager feature has not been enabled.
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.Configuration.Provider.ProviderException: The Role Manager feature has not been enabled.
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. 

If we then change the web,config to enable the roleManager entry, we get a different error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Default Role Provider could not be found.
Source Error:
Line 97:     </membership>
Line 98:    
Line 99:     <roleManager enabled="true" cacheRolesInCookie="true" cookieName=".uManageRoles"
Line 100:      cookieTimeout="15" cookiePath="/" cookieSlidingExpiration="true"
Line 101:      cookieProtection="All">
Source File: C:\uManage\web.config    Line: 99
Version Information:
Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

1. Have we guessed correctly in adjusting the AddUser.sql query?
2. What are we missing regarding the Role Provider entry?

Thank you very much!

Oct 24, 2011 at 5:20 PM

Hi Greg,

This usually means that there was a configuration error during the setup wizard, which is what you saw.  The error you see is caused because the wizard did not turn on the Role Manager properly.  In the error message provided in the roleManager section you can see it is enabled however there is another required parameter to specify the default provider.  In the roleManager section you will need to add the following: defaultProvider="RoleProvider".  Make sure the "RoleProvider" name matches the name of the provider listed within the Role Manager section.

I'm not sure exactly why the SQL query did not execute.  What version of SQL are you using?  Regardless the change to the web.config file should get the app running for you.


Oct 24, 2011 at 5:23 PM

Thank you! Will try that. The SQL Server is 2008 R2 hosted on 64bit Windows Server 2008 Enterprise R2.

Oct 24, 2011 at 6:09 PM

Okay, that did correct that part of the configuration. Now I have a new one. Will create a new thread because it's both a lame problem and I'm out of options for my lameness.

Thanks again!