I have been working on this project for many days without success and your help and solution is really much appreciative.
It's about Active Directory, username login permissions to view or not some asp.net web applications.
Please see code below:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim User As System.Security.Principal.IPrincipal
User = System.Web.HttpContext.Current.User
Dim username As String = "JBlake"
Dim username1 As String = "ABaron"
Dim username2 As String = "DDale"
Dim username3 As String = "JPack"
Dim username4 As String = "JDoe"
If Not Roles.IsUserInRole(User.Identity.Name, "username, username1, username2, username3, username4") Then
Catch ex As Exception
When username: JBlake, ABaron, DDale, JPack, JDoe (these are not allow to view a web application
called "phonedirectory") log in the "NotAutorized.aspx" doesn't display and but they are viewing the page where they are not
allowed to view it and also display an error message: The parameter 'roleName' must not contain commas. Parameter name: roleName.
What am I doing wrong?
Hope you could help me on this. Thanks much