[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Role Management

Asked by SETP in Programming for ASP.NET, Adobe Type Manager

Tags: login1_authenticate

I am developing a website in Visual Studio 2005 using ASP.NET 2.0 technology. Using the Web Site Administration Tool, I have changed the website to use Forms Authentication, created a few users, turned on Roles, and created a couple of roles which I then assigned to the users.

Now on my web form I placed the ASP.NET Login control on the form. It works perfectly and I can login and logout and everything. My problem is that once the user has logged in, I want to check which role he is in so that I know where to redirect him. I use the following code in the Login1_Authenticate event (Login1 is the name of the Login control):

Select Case True
    Case User.IsInRole("Teacher")
        Response.Redirect("~/Teacher.aspx")
               
    Case User.IsInRole("Parent")
        Response.Redirect("~/Parent.aspx")

    Case User.IsInRole("Student")
        Response.Redirect("~/Student.aspx")
End Select

But it goes right through the Select Case block without any of the cases being true. Now those are the only roles I have defined, and every user belongs to one of those roles, so one of them should be true! I tried moving the code to the Login1_LoggedIn event rather, but same problem. I even tried it on the Page_Load event and nothing. If I check the User.Identity.IsAuthenticated method, it returns false. But the user is definitely logged in because if I type the wrong username or pasword it complains, and as soon as I type the correct username and password then it's fine. Any ideas? Thanks
 
Related Solutions
Keywords: Role Management
 
Loading Advertisement...
 
[+][-]08/02/06 03:22 AM, ID: 17231667Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Programming for ASP.NET, Adobe Type Manager
Tags: login1_authenticate
Sign Up Now!
Solution Provided By: Ramkumar_VN
Participating Experts: 3
Solution Grade: B
 
[+][-]08/02/06 03:18 AM, ID: 17231637Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/02/06 03:26 AM, ID: 17231691Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/02/06 04:32 AM, ID: 17231999Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/02/06 05:06 AM, ID: 17232397Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/02/06 05:13 AM, ID: 17232459Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/02/06 06:25 AM, ID: 17233018Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/02/06 07:19 AM, ID: 17233526Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/04/06 05:13 AM, ID: 17249321Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/23/06 02:00 AM, ID: 17370581Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92