J
Jerry C
I am using the ActiveDirectoryMembershipProvider for forms authentication in
a application the user id validated with the line.
if (Membership.ValidateUser(UserName.Text,Password.Text))
{
wp.IsInRole("cd\\System Admin") //Works great
String ICdUser = WindowsIdentity.GetCurrent().Name;
//gets user looks like this CD\\cdadmin
String[] RollUsers = Roles.GetRolesForUser(ICDUser); //does not work
}
The error is:
Method is only supported if the user name parameter matches the user name in
the current Windows Identity.
I am using the line:
<roleManager defaultProvider="AspNetWindowsTokenRoleProvider"
enabled="true"/>
for the role manager and I am sure the membership provider is working since
the user is validated.
since the line WindowsIdentity.GetCurrent().Name works and returns the user
there must be a Windows Identity.
What am I doing wrong.
Thank you for helping
a application the user id validated with the line.
if (Membership.ValidateUser(UserName.Text,Password.Text))
{
wp.IsInRole("cd\\System Admin") //Works great
String ICdUser = WindowsIdentity.GetCurrent().Name;
//gets user looks like this CD\\cdadmin
String[] RollUsers = Roles.GetRolesForUser(ICDUser); //does not work
}
The error is:
Method is only supported if the user name parameter matches the user name in
the current Windows Identity.
I am using the line:
<roleManager defaultProvider="AspNetWindowsTokenRoleProvider"
enabled="true"/>
for the role manager and I am sure the membership provider is working since
the user is validated.
since the line WindowsIdentity.GetCurrent().Name works and returns the user
there must be a Windows Identity.
What am I doing wrong.
Thank you for helping