Forums
This topic is locked
NT Authentication w/ SQL Server
Posted 02 Mar 2004 15:31:25
1
has voted
02 Mar 2004 15:31:25 Drew Laing posted:
I am currently building interfaces for SQL Server databases in ASP. I need to use NT Authentication for allowing/disallowing users to use different parts of the site. How can I restrict access? Do I need to make a special database connection string to restrict access? I can't quite get my head around this one. Here is a scenario:If Mary is in Payroll, and she boots up her computer, and logs into Windows (domain) and pulls up this "intranet". It should let her into what she needs to do, but not into other parts. And she shouldn't have to enter her username and password, it should inherit it from the Windows login.
Is that too much to ask? Any help will be appreciated!
Thanks,
Drew Laing
SWVTC
Replies
Replied 03 Mar 2004 02:27:28
03 Mar 2004 02:27:28 Phil Shevlin replied:
I know of no way to tie into all aspects of NT permissions (forgive me I'm not a network person). However, what you want to do is absolutely possible.
Asp can capture the user's login name Go here for the howto:
www.4guysfromrolla.com/webtech/020201-1.shtml
You would need to create a DB table that has all users' login names along with their permission group(s). When the page loads it finds the DB record that matches the LOGON_USER and a sets cookie (?) to there group name. If they belong to multiple groups things make get more difficult. But its a start.
Asp can capture the user's login name Go here for the howto:
www.4guysfromrolla.com/webtech/020201-1.shtml
You would need to create a DB table that has all users' login names along with their permission group(s). When the page loads it finds the DB record that matches the LOGON_USER and a sets cookie (?) to there group name. If they belong to multiple groups things make get more difficult. But its a start.
Replied 03 Mar 2004 02:38:10
03 Mar 2004 02:38:10 Drew Laing replied:
Thanks, that is right up my alley! I really appreciate your post!
Thanks,
Drew Laing
Thanks,
Drew Laing
Replied 03 Mar 2004 02:45:07
03 Mar 2004 02:45:07 Phil Shevlin replied:
NP