Error with ASPNET RoleProvider

I just installed an application on a win2003 server and I'm getting this error:

Line 149:    <roleManager>
Line 150:      <providers>
Line 151:        <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 152:        <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 153:      </providers>

Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config    Line: 151

I'm using a RoleProvider and it's properly configured in web.config (it works on other servers) as follows:

<membership defaultProvider="AdminMembershipProvider">
    <add name="AdminMembershipProvider" connectionStringName="SiteSqlServer" type="MyApp.Providers.AdminMembershipProvider" applicationName="MyApp" writeExceptionsToEventLog="false" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" PasswordFormat="Clear" MinRequiredNonAlphanumericCharacters="1" MinRequiredPasswordLength="8" MaxInvalidPasswordAttempts="5" PasswordAttemptWindow="10">
<roleManager enabled="true" defaultProvider="AdminRoleProvider" cacheRolesInCookie="true">
    <add name="AdminRoleProvider" type="MyApp.Providers.AdminRoleProvider" writeExceptionsToEventLog="true"/>

Any hint on why it's looking for configuration on machine.config instead of web.config? How can I debug this?

Thank you.


Indeed it read machine.config first, then your web.config which supercedes machine.config. But in some cases the values in the web.config are appended or included in a list so it can get a little hard to follow.

But perusing the machine.config on a working server might shed some more light for you.

The Machine.Config holds settings that pertain to the entire computer. Some Elements of the Machine.Config allow you to override them. If an element has a allowOverride = "true" attribute it can be overridden the web.config. However, if it works on other machines I would look at differences in machine.config files.

Keep in mind it is not usually a good idea to edit the machine.config esp. if you plan on deploying to multiple machines.

Need Your Help

how to clone content of a div to another div

jquery dynamic html copy clone

I want to copy the content of a selected div to another div with jquery clone.

memory allocation error with scanf

c memory memory-management valgrind scanf

I have this simple code, and can't figure out how to allocate memory for scanf

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.