Problem with the AzMan RoleManager

S

Stefan

Hello!
I´m using windowsauthentication in my asp.net 2.0 website. I have some
problems using the rolemanager. I´m using the AuthorizationStoreRoleProvider
to perform "role checks" against active directory (win 2000).
A part of the problem, I think, is that the User.Identity.Name is like
<domain>\<user> and I think that is what is used when checking roles, but it
only works for me if I only supply the <user> when checking a role.

Some output :
?user.Identity.Name
"myDomain\Steve"
?user.IsInRole("myRole")
False
?roles.IsUserInRole("Steve", "myRole")
True
?roles.IsUserInRole("myDomain\Steve", "myRole")
False
?context.User.Identity.IsAuthenticated
True
?context.User.Identity.AuthenticationType
"NTLM"
?context.User
{System.Web.Security.RolePrincipal}
System.Web.Security.RolePrincipal: {System.Web.Security.RolePrincipal}
Identity: {System.Security.Principal.WindowsIdentity}


A problem here is that I´m using securitytrimming so that the user only
see´s links to pages which they have access to and this does not work becuase
of this. What can I do about this? Can i change something in my configuration
or can I change some property in active directory or something.
What is even more strange is that some of the roles I have assigned to
account groups like 2 weeks ago now have started to work (also
user.IsInRole("Role1") works), but when creating new roles they don´t work. I
created some roles and groups 3 days ago and they still dowsn´t work.

Thanks In Advance
/ Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top