Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using NT Authentication 2

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
Is it possible, there must be, a way to use NT authentication using ASP in VB there is
(strUserID = Environ("USERNAME")) but what about ASP and if you can how would I implement it. AJ
I would lose my head if it wasn't attached. [roll1]
 
You can disable anonymous access to the website or virtual folder. When they login, you can do a Request.ServerVariables("LOGON_USER") and check to see if that is the user you want to logon. You could store a list of users in a db, and do a query saying SELECT username FROM users WHERE username='"& Request.ServerVariables("LOGON_USER") &';

It won't do much in the lines of making sure that only a certain group of users will get in, but it's a start.
 
Never heard of the checker component. What does it do and how does it work.

Thanks baddos I remember seeing that somewhere. AJ
I would lose my head if it wasn't attached. [roll1]
 
Permission checker component is part of the range of server components installed default by IIS. It is used to determine whether the account under which the current user is accessing our site has permissions to access a file(in win NT/2000 only).

How to use it:

1. Turn off "allow anonymous access" in internet services manager for the site or a specific directory.
2.Now all users have to supply their account details. In windows explorer set up specific permissions on each file.
3. Instantiate the permission checker component in the page and check to see if the user has access to the specified resource.

Set objPermit=Server.createobject("MSWC.PermissionChecker")
If objPermit.HasAccess("filename") Then
'your code here
End if

I hope this will be of help.
 
Will try it thanks AJ
I would lose my head if it wasn't attached. [roll1]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top