We need to see your web.config. How are roles handled? Is role manager enabled?
EDIT:
You should use this format:
User.IsInRole(@"DOMAINNAME\rolename")
You are leaving the domain name. If this still does not work, make sure you have the role provider installed in web.config:
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
This information comes directly from MSDN . See the section "Verifying the Membership Role in Code". It is all there.
Bryan
source share