-
Accessing NT User Groups in ASP
Hello, I can access NT user names in ASP using the
server variable LOGON_USER, or REMOTE_USER.
But now I need the ability to read a users Group
within the context of an ASP page.
So far I have controlled group permissions
at the file system level. However now I need the ability
to grant/deny permission, not to a certain file, but
to certain links, functions, etc within an ASP application.
[
If Request.ServerVariables("REMOTE_USER") = "jgunder" Then
Call SubAdminText
Else
Call SubUserText
End If
]
When what i really need is something like
[
If Request."Users NT GROUP??" = "Administrators" Then
Call SubAdminText
Else
Call SubUserText
End If
]
Of course, IF this is possible, then the code would probably
have to be iterative since a user can reside in many groups.
Within ASP, accessed through http, is there a way to determine
what groups an NT user is a member of?
This is on NT4 IIS4.
Thanks
Josh
-
Re: Accessing NT User Groups in ASP
Have a look at ADSI it should be able to handle this for
you. Do a search on MSDN and you'll find some
examples.
James.
http://www.siteknowhow.com
Joshua Gunder <jgunder@comarco.com> wrote in message
news:39ae9dc3$1@news.devx.com...
>
> Hello, I can access NT user names in ASP using the
> server variable LOGON_USER, or REMOTE_USER.
> But now I need the ability to read a users Group
> within the context of an ASP page.
>
> So far I have controlled group permissions
> at the file system level. However now I need the ability
> to grant/deny permission, not to a certain file, but
> to certain links, functions, etc within an ASP application.
>
> [
> If Request.ServerVariables("REMOTE_USER") = "jgunder" Then
> Call SubAdminText
> Else
> Call SubUserText
> End If
> ]
>
> When what i really need is something like
>
> [
> If Request."Users NT GROUP??" = "Administrators" Then
> Call SubAdminText
> Else
> Call SubUserText
> End If
> ]
>
> Of course, IF this is possible, then the code would probably
> have to be iterative since a user can reside in many groups.
>
>
> Within ASP, accessed through http, is there a way to determine
> what groups an NT user is a member of?
> This is on NT4 IIS4.
>
> Thanks
> Josh
-
Re: Accessing NT User Groups in ASP
But don't you have to be running active directory for
that to work? I'm not running any services like that
on my NT.
"James Dooley" <james@siteknowhow.com> wrote:
>Have a look at ADSI it should be able to handle this for
>you. Do a search on MSDN and you'll find some
>examples.
>
>James.
>http://www.siteknowhow.com
>
>Joshua Gunder <jgunder@comarco.com> wrote in message
>news:39ae9dc3$1@news.devx.com...
>>
>> Hello, I can access NT user names in ASP using the
>> server variable LOGON_USER, or REMOTE_USER.
>> But now I need the ability to read a users Group
>> within the context of an ASP page.
>>
>> So far I have controlled group permissions
>> at the file system level. However now I need the ability
>> to grant/deny permission, not to a certain file, but
>> to certain links, functions, etc within an ASP application.
>>
>> [
>> If Request.ServerVariables("REMOTE_USER") = "jgunder" Then
>> Call SubAdminText
>> Else
>> Call SubUserText
>> End If
>> ]
>>
>> When what i really need is something like
>>
>> [
>> If Request."Users NT GROUP??" = "Administrators" Then
>> Call SubAdminText
>> Else
>> Call SubUserText
>> End If
>> ]
>>
>> Of course, IF this is possible, then the code would probably
>> have to be iterative since a user can reside in many groups.
>>
>>
>> Within ASP, accessed through http, is there a way to determine
>> what groups an NT user is a member of?
>> This is on NT4 IIS4.
>>
>> Thanks
>> Josh
>
>
-
Re: Accessing NT User Groups in ASP
Yes, but if you've been keeping up with the service packs etc... I think
you'll find it is already installed! I've yet to come across an NT box
that it was NOT installed on. In any case you can download it from
MS and it is only a couple of hundred K.
Regards,
James.
"Joshua Gunder" <jgunder@comarco.com> wrote in message
news:39b04b02$1@news.devx.com...
>
> But don't you have to be running active directory for
> that to work? I'm not running any services like that
> on my NT.
>
> "James Dooley" <james@siteknowhow.com> wrote:
> >Have a look at ADSI it should be able to handle this for
> >you. Do a search on MSDN and you'll find some
> >examples.
> >
> >James.
> >http://www.siteknowhow.com
> >
> >Joshua Gunder <jgunder@comarco.com> wrote in message
> >news:39ae9dc3$1@news.devx.com...
> >>
> >> Hello, I can access NT user names in ASP using the
> >> server variable LOGON_USER, or REMOTE_USER.
> >> But now I need the ability to read a users Group
> >> within the context of an ASP page.
> >>
> >> So far I have controlled group permissions
> >> at the file system level. However now I need the ability
> >> to grant/deny permission, not to a certain file, but
> >> to certain links, functions, etc within an ASP application.
> >>
> >> [
> >> If Request.ServerVariables("REMOTE_USER") = "jgunder" Then
> >> Call SubAdminText
> >> Else
> >> Call SubUserText
> >> End If
> >> ]
> >>
> >> When what i really need is something like
> >>
> >> [
> >> If Request."Users NT GROUP??" = "Administrators" Then
> >> Call SubAdminText
> >> Else
> >> Call SubUserText
> >> End If
> >> ]
> >>
> >> Of course, IF this is possible, then the code would probably
> >> have to be iterative since a user can reside in many groups.
> >>
> >>
> >> Within ASP, accessed through http, is there a way to determine
> >> what groups an NT user is a member of?
> >> This is on NT4 IIS4.
> >>
> >> Thanks
> >> Josh
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks