javierpdx
asked on
redirect user after login based on a AD Group membership
After a user is authenticated, I want to redirect a user to a certain webpage based on a AD group membership. How can I do this? The group membership string : "Student.Admit,"
I'm trying to do this:
if AuthenticateUser.UserGroup Membership s = "Student.Admit,"
Response.Redirect("Offer.a spx");
IntelliSense Error on line 7 below is "Cannot implicitly convert 'string' to bool.'"
I'm trying to do this:
if AuthenticateUser.UserGroup
Response.Redirect("Offer.a
IntelliSense Error on line 7 below is "Cannot implicitly convert 'string' to bool.'"
try
{
AuthenticateUser =
AD.AuthenticateUserGetADIdentityAttributesGetADGroupMemberships(this.textboxUserName.Text, this.textboxPassword.Text);
if (AuthenticateUser.UserIsAuthenticated)
{
if AuthenticateUser.UserGroupMemberships = "Student.Admit,"
Response.Redirect("Offer.aspx");
{
Session["UserGroupMemberships"] = AuthenticateUser.UserGroupMemberships;
Response.Redirect("NextPage.aspx");
} }
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, the group does return the comma after "Student.Admit".
I got this to work as expected.