I wasn't sure if it best to post this in the vb.net forum as that's what I'm using or asp.net, please move as appropriate.
I have a simple web form application that should be redirecting users to specific pages based on their active directory global group membership.
We have 3 regional AD domains with 2 global groups in domain1, each of those groups contains a collection of members from all three domains.
The members that have their accounts in domain1, the same where the groups reside, authenticate properly. Group members in domains 2 and 3 receive 401 errors.
I'm still learning so I'm probably missing something simple, below is my code, using Windows Authentication on IIS 7.5, .NET 4.0.
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If My.User.IsAuthenticated Then If Page.User.IsInRole("domain1\group1") = True Then Response.Redirect("~/admin/default.aspx") ElseIf Page.User.IsInRole("domain1\group2") = True Then Response.Redirect("~/support/default.aspx") Else Response.Redirect("~/default.aspx") End If End If End Sub