ASP .Net Windows Authorization
Posted on 2011-02-17
I am working on a small intranet project to make some simple gridview reports available to specific users.
I would like to limit access based on whether or not the windows username appears in a SQL table I will maintain separately. (ie not role based or active directory style authorization, simply a list of discrete user names).
Windows authentication is running fine and I can show the user name via <asp: LoginName
I was hoping it might be as easy as replacing "Kim" in the example below with some thing like a SQL statement Select * from Tbl_Approved_Users
I would have thought this answer would be easy to google but I've made no progress, perhaps I am looking at the problem incorrectly.
Your thoughts greatly appreciated!