Last post Jul 23, 2008 02:36 PM by ASQ
Jul 22, 2008 04:37 PM|ASQ|LINK
I have been spoiled with the build in login controls VWD for normal web sites, and I never really though about the actions the Login Control does - off-course it authenticates the user, but what makes that a user become "logged in"?
Now that I am trying to create a login page for my mobile web, now I am stuck with the last bit of the login procedure...
I have created a mobile web form with two mobile text boxes (one for the username and one for the password), and then a command/button to submit.
1) When I hit the submit button, then in my code-behind I set a connection to the database.
2) Then I match the username with one that is stored in the database, and find the associated password in the database.
3) Then I compare the password from the database, with the password from the textbox.
4) If they match, then this user valid.
What do I do next, to actually "log in"? Change some parameter to "true" or do I have to create a cookie or something so that the user now have the status as being "logged in"?
I will appreciate some guidance on what I need to do in step (5). I have tried to change the value of User.Identity.IsAuthenticated = true; but I get an error stating that "it can not be assigned to - it is read only".
Jul 23, 2008 02:36 PM|ASQ|LINK
Should anyone be interested, the method to change a user's "IsAuthenticated" value to "true" (and if you are using Forms Authentication), then use:
USERNAME refers to the actual username supplied by a text box for example.