Hey,
Ive been google'ing and trying to figure this out for ages, I don't see what I've done wrong, could someone please help???
Im using the below code and I have no idea why it is returning false...
public bool checkIn(string group)
{
System.Security.Principal.WindowsPrincipal user = new WindowsPrincipal(WindowsIdentity.GetCurrent());
return user.IsInRole(@"Bubblebee\Admin");
}
The weird thing Im seeing here is it returns true if I use the group @"Bubblebee\HomeUsers" in place of the 'group' variable, but any other groups I type in.. Bubblebee\Administrators , or even groups ive created like 'Admin', all return false, Im definitely a member of these groups and they are all local to my machine, no domain is setup.
Just to be sure ive also disabled anonymous logins and enabled windows authentication, I've also added the below line to my web.config (not sure if its needed, didn't help)
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>