My ASP.NET app is using windows authentication. If I run the following code:
WindowsIdentity wi = (WindowsIdentity)User.Identity;
foreach (IdentityReferenc
We need to see your web.config. How are roles handled? Is the role manager even enabled?
EDIT:
You need to use this format:
User.IsInRole(@"DOMAINNAME\rolename")
You are leaving off the domain name. If that still doesn't work, make sure you've got your role provider set in web.config:
This information comes straight from MSDN. Look at the "Checking Role Membership in Code" section. It's all there.