customize RoleProvider without using Membership or ASP.NET Identit

1

Good morning. My question is the following and I have the authentication part of my system made without using Membership or ASP.NET Identit. and I wanted to make or use the [Authorize] method already I took an example in google where I did the following

    
asked by anonymous 02.06.2015 / 16:54

1 answer

0

Apparently the implementation code is ok, but there is something weird about the configuration. You are using parameters of MembershipProvider to set a RoleProvider .

I would do so:

<configuration>
  ...
  <system.web>
    ...
    <roleManager enabled="true" defaultProvider="PermissaoProvider">
      <providers>
        <clear />
        <add name="PermissaoProvider" type="Site.Security.PermissaoProvider" connectionStringName="conexao" applicationName="/" />
      </providers>
    </roleManager>
    ...
  <system.web>
  ...
<configuration>
    
02.06.2015 / 18:00