Using: VS 2008 - SQL 2008 - VB
Windows Authentication - [url removed, login to view] (Sql 2008)
I have two questions that needs answers:
1. I need to change the current role of a user after he has logged in. ie: I have a user who is in three roles: Admin - Purchasing - IT. When he opens the application he is logged in automatically <authentication mode="Windows">. All is fine so far. I have a page [url removed, login to view], which populates a droplist with the roles that the current user belongs to. Still fine so far. Page [url removed, login to view]
Protected Sub btnChange_Click(ByVal sender As Object, ByVal e As [url removed, login to view]) Handles [url removed, login to view]
' save selected role to session
[url removed, login to view] = [url removed, login to view]
The above works if using Forms Authentication but NOT using windows authentication. I get an Error: Name'UserSession' is not declared.
2. I'm using the aspnetdb on SQL2008. How can I or where do I add a field (Active or AllowLogin)
so a user can be denied access, using Windows Authentication. More specifically, since I'm using Windows Authentication, where or how do I intervene in the login process.
Please feel free to ask questions.