0

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.

Sam M
  • 1,077
  • 2
  • 20
  • 42
  • In the YSOD, you haven't specified an assembly name as you did in your code snippet: `type="MASSIA.Helpers.MASSIARoleProvider, MASSIA"`. – Darin Dimitrov Oct 01 '13 at 08:51
  • @DarinDimitrov, please check, i have updated my question with the latest error image. – Sam M Oct 01 '13 at 08:58

1 Answers1

1
<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.

farhat
  • 84
  • 3
  • 8