I am using Visual Studio 2010. I created 4 folders (Folder1, Folder2, Folder3, Folder4) that I only want particular user roles to be able to access. I used the web site admin tool to create the 4 different roles (Role1, Role2, Role3, Role4) and set the
access rules for the folders.
I have just created a login page and have added a login control. Depending on the role of the user that logs in I want them to be redirected to different pages located in their security protected folders.
How could I go about this? I imagined some code in the C# file for the login page essentially performning on the authentication be completed: if userrole= "Role1" , redirect to..., else if userrole="Role2", redirect to....
laudrup
0 Points
10 Posts
Redirect on user login based on user role
Apr 24, 2012 12:47 AM|LINK
Hi,
I am using Visual Studio 2010. I created 4 folders (Folder1, Folder2, Folder3, Folder4) that I only want particular user roles to be able to access. I used the web site admin tool to create the 4 different roles (Role1, Role2, Role3, Role4) and set the access rules for the folders.
I have just created a login page and have added a login control. Depending on the role of the user that logs in I want them to be redirected to different pages located in their security protected folders.
How could I go about this? I imagined some code in the C# file for the login page essentially performning on the authentication be completed: if userrole= "Role1" , redirect to..., else if userrole="Role2", redirect to....
Thanks for your help. Am still new to this.
Cheers
laudrup
0 Points
10 Posts
Re: Redirect on user login based on user role
Apr 24, 2012 05:38 AM|LINK
Solved my problem using this really good thread: http://forums.asp.net/t/1403132.aspx/1