Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Using AspNetWindowsTokenRoleProvider #900


User avatar
0
klainer created

Hello

I need to use AspNetWindowsTokenRoleProvider with ABP together. In web.config a created these configuration:

<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider">
  <providers>
    <clear />
    <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
  </providers>
</roleManager>

When I run application I have this problem:

Windows Identity Method is only supported if the user name parameter matches the user name in the current Windows Identity.

This error occurs only when I use ClaimsIdentity to login User. When I login user with WindowIdentity I got another problem with application. My ClaimsIdentity have the same UserName but no work :/

So it is possible to create ClaimsIdentity which work with this role manager ? I need to get USER ActiveDirectory UserGroups / Roles and use it like this:

var User = System.Web.HttpContext.Current.User;
if (User.IsInRole("DOMAIN\\group")){  ...    }

Have anybody solution for windows auto sign on to ABP and use this manager ?

Thanks for HELP !


No answer yet!