Question

My application is in Asp.Net MVC3, my application was running perfectly but all of a sudden i'm getting an error in my Web.Config in my role manager tag.

Below is my RoleManager tag of web.config

<roleManager defaultProvider="MASSIARoleProvider" enabled="true" cacheRolesInCookie="true">
      <providers>
        <clear />
        <add name="MASSIARoleProvider" type="MASSIA.Helpers.MASSIARoleProvider, MASSIA" connectionStringName="MASSIAEntities" />
      </providers>
    </roleManager>

Below is the error i'm getting directly when i run my application:

[updated Error Image] enter image description here

I have a file MASSIARoleProvider.cs in my solution in the directory Helper.

Below is Heirarchy of my RoleProvider file.

--> Massia --> Helpers --> MASSIARoleProvider.cs

My solution was executing perfectly but i'm getting this error all of a sudden.

Was it helpful?

Solution

<roleManager defaultProvider="MASSIARoleProvider" enabled="true" cacheRolesInCookie="true">
        <providers>
        <clear />
        <add name="MASSIARoleProvider" type="MASSIA.Helpers.MASSIARoleProvider" connectionStringName="MASSIAEntities" />
        </providers>
        </roleManager>

Attemp 2:

Check for your MASSIARoleProvider file and see whether the Solution name and references used are perfectly correct.

Attempt 3:

The last and least recommended.

Create a new solution, if and only if your solution is in the beginning stage and try to reconfigure the RoleProvider. Once it solved the issue for me, I made a new solution, added the existing files to the news solution and executed the new solution and it executed perfectly. I did not made any change to the code, i just included the existing files from the old solution to the new one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top