asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search





Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Code Samples
Components
Tools
New
Free
Downloads
Vendors
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Checking NT Group for User Permissions

To check to see if users have rights to login to your IIS server, check their NT group. First, get their NT group list in the Global.asa file:


Sub Session_OnStart
    on error resume next
    
    strUsername=Replace(ucase(Request.ServerVariables("LOGON_USER")) , "\", "/")  
    set adsUser = getobject("WinNT://" & strUsername)
    for each group in adsUser.groups
         GrpList = GrpList & lcase(trim(group.name)) & ";"
    next 

    if instr(1, GrpList ,"SecureNTGroupName") then session("permission") = "OK"
End sub

Then in your ASP page, check on a session variable to see if they are allowed in or not.:



<% 
    if session("permission") <> "OK" then Response.Redirect "loginfailure.asp" 
%>  

submitted by Ian Vink



email this code sample to a colleague

Related Articles
Aug 28, 1997 - Designing Multiple Web Sites with IIS 4.0
IIS 4.0 allows you to have multiple web sites on one machine. Though IIS 3.0 has this capability, IIS 4.0 expands the functionality of multiple web sites by adding additional characteristics to sub-directories, and allow for multiple applications. Special considerations need to be made when designing and administrating multiple web sites on a single machine, including when to use sub-directories, when to use virtual directories, how to handle security, and the handling of multiple applications.
[Read This Article]  [Top]
Nov 27, 1997 - Performance Tuning
This article is a reprint of chapter 15, by Nelson Howell , in a new book called 'Using Microsoft Internet Information Server 4' from Que Education & Training (ISBN 0789712636) due for publication in early March 1998. The chapter covers performance tuning of the Internet Information Server version 4.0. Including: What is performance, building web sites for speed, and the performance monitor.
[Read This Article]  [Top]
Nov 28, 1997 - Understanding and Planning for Server-Side Loading
This article is a reprint of chapter 16, by Nelson Howell , in a new book called 'Using Microsoft Internet Information Server 4' from Que Education & Training (ISBN 0789712636) due for publication in early March 1998. This chapter covers understanding and planning for server-side loading with the Internet Information Server version 4.0. Including determining load using performance monitor, using event viewer to discover errors, using TCP/IP troubleshooting utilities, configuring ODBC loads and understanding IIS logging.
[Read This Article]  [Top]
Nov 29, 1997 - Be Your Own ISP: Allowing Dynamic User Access
This article is a reprint of chapter 19, by Nelson Howell , in a new book called 'Using Microsoft Internet Information Server 4' from Que Education & Training (ISBN 0789712636) due for publication in early March 1998. This chapter covers being your own ISP: allowing dynamic user access. Including: setting up and providing clients with the ability to control their own Web site is a simple matter and getting the content there are two ways of uploading content to client Web sites: the traditional FTP method and the newer HTTP PUT facility.
[Read This Article]  [Top]
Nov 30, 1997 - Advanced Security Concepts
This article is a reprint of chapter 19, by Nelson Howell , in a new book called 'Using Microsoft Internet Information Server 4' from Que Education & Training (ISBN 0789712636) due for publication in early March 1998. This chapter covers advanced security concepts. Including: how to secure content Enforce security permissions for sensitive and private content and configuring user authentication understand and use authentication methods for securing content.
[Read This Article]  [Top]
Related Knowledge Base Articles
IIS Execution File Text Can Be Viewed in Client
Q164059 - 1997.06.23
Related Products
AspCodeLock
ServerObjects Inc. announces AspCodeLock. This product will allow you to encrypt ASP script code at development time. AspCodeLock will dynamically decode the script when requested by IIS and execute it under the ASP environment. Your ASP code is processed in memory and is not written unencrypted to disk by AspCodeLock
[Top]


Support the Active Server Industry

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers