Posted on: 5/11/2011 4:23:53 AM | Views : 242

Dear all I've build a login page with users defined in asp.net web administration tool and I’m trying to give permissions depending on User Role I use this code
Public Sub mainlogin_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles mainlogin.Authenticate
If Membership.ValidateUser(mainlogin.UserName, mainlogin.Password) Then Dim usrInfo As MembershipUser = Membership.GetUser(mainlogin.UserName) Session("UsrName") = usrInfo.UserName If User.IsInRole("Deans") Then Session("UsrRole") = "Deans" ElseIf User.IsInRole("Rector") Then Session("UsrRole") = "Rector" End If But the thing is, the User.IsInRole is empty because the User in not yet assigned to the the user who’s logging in Kindly help to code it, I don’t know how please it's very urgent
...

Go to the complete details ...