Share via

ASP.NET WebApp web.config error

Oscilloscope 20 Reputation points
2025-02-23T18:56:27.2933333+00:00

Hello,

I am getting a web.config error on my visual studio 2022 local environment.

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: **__Provider must implement the class 'System.Web.Security.RoleProvider'.

My web.config code is:

<configuration>

<roleManager enabled="true">

<providers>

<add name="SqlProvider"

     type="System.Web.Security.SqlMembershipProvider"

  connectionStringName="ConnectionStringMain" enablePasswordRetrieval="false"

  enablePasswordReset="true" requiresQuestionAndAnswer="false"

  passwordFormat="Clear" minRequiredPasswordLength="6"

  minRequiredNonalphanumericCharacters="0"

  applicationName="CMH"/>

</providers>

</roleManager>

</configuration>

Any help would be appreciated.

Thanks,

Oscilloscope

Developer technologies | ASP.NET Core | ASP.NET API

Answer accepted by question author

SurferOnWww 6,016 Reputation points
2025-02-26T03:55:52.2833333+00:00

I am also using .net 3.5 (working with code I wrote 10 years ago). Interestingly I can query the aspnetDB database with VBS.net code.

Please try the following default settings:

<roleManager enabled="true">
  <providers>
    <clear />
    <add connectionStringName="ConnectionStringMain" 
      applicationName="/" 
      name="AspNetSqlRoleProvider" 
      type="System.Web.Security.SqlRoleProvider" />
  </providers>
</roleManager>

Note that "ConnectionStringMain" must be the connection string to your aspnetDB database.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.