Re: ASP.Net 2.0: Problem User.isinrole() <domain>\<user> instead of <u



Hello Stefan,

i guess you set up your authorization store like this

roleX points to domain\GroupX

or similar

you have to pass the name of the AzMan role into IsInRole.

The security trimming feature takes the url in the sitemap file and compares the users' authorization to the <authorization> element in web.config.
The <authorization> element must use the AzMan role names in the allow/deny elements.


---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

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).
The problem 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
The 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.

Thanks In Advance
/ Stefan


.



Relevant Pages

  • Help Adding Trusted Domain user to Trusting Domain Group
    ... We gave created a web application that uses AD for authorization and ... authentication. ... familiar with Active Directory). ... Add the found user object from Domain A to the group on Domain B ...
    (microsoft.public.dotnet.general)
  • New Users cannot open Companyweb
    ... authorized page and the usual request for authorization page - I have ... I have the DNS Event 4015 in my Event viewer, but this was 3 weeks ago, the ... Should I just add these 2 users into the Active Directory ??? ...
    (microsoft.public.windows.server.sbs)
  • Re: DHCP Server not handing out IP Addresses after SP2 install
    ... Server" then you need to do so so addresses can be issued. ... this could be a Replication problem also since authorization is held ... Note the above only applies in an Active Directory Domain, ... I believe it would also work for a Workgroup Server which is exposed to ...
    (microsoft.public.windows.server.general)
  • Authorization Application Block/ COM object with CLSID exception
    ... I'm using the authorization application block, with an active directory ... i've specified my store location as following: ...
    (microsoft.public.dotnet.security)