I want to be able to use loginviews to display different content based on who is logged in. I am using a remote system to handle user logins and it will send back a token and a "yes" or "no" depending on whether the user is valid. So, my login.aspx page handles the redirection and the server response.
What I would like to do is: once I get a response back, programmaticall y login the user giving them the proper rights.
I have created two users (admin and user) using the ASP Website Administration Tool and two roles (admin and user), each user is part of their role, respectively.
I have tried creating users in the web.config and then calling
Expand|Select|Wrap|Line Numbers
- FormsAuthentication.Authenticate("username", "password")
but then when I check:
Expand|Select|Wrap|Line Numbers
- User.Identity.IsAuthenticated
Any ideas as to how I can actually get a user logged in so that the loginview will show content accordingly?
Thanks!!