Thanks for your reply, but the main problem is not get information from AD,
it's how can I know which user has accessed the ASP.NET page.
[]'s
> You can have one resource account that has AD query previlige and something
> like
[quoted text clipped - 9 lines]
> >
> > Thanks
bzhang - 28 Feb 2004 17:42 GMT
You can use Request.ServerVariables["logon_user"], but there're no guarantee
that it will give you the result all the time. Espeically if you have
non-domain or non-window users.
> Thanks for your reply, but the main problem is not get information from AD,
> it's how can I know which user has accessed the ASP.NET page.
[quoted text clipped - 16 lines]
> > >
> > > Thanks
eRic - 29 Feb 2004 00:36 GMT
To get the user name you need to turn off anonymous access on the site. IIS will then request the user's credentials.
At that point you can use the Context.User object and get stuff like .Identity.Name
- eZe
Alexey Smirnov - 29 Feb 2004 12:32 GMT
If your AD allows to read data for anonymous users such as default iis user
when you have to turn off anonymous access and turn on Windows
Authentication only in website properties
But in many cases w/o impersonation it is not possible to get data from AD.
Either to turn on impersonation (in web.config) or to use a COM-component,
which could be executed with account of an user who has rights read AD
> To get the user name you need to turn off anonymous access on the site. IIS will then request the user's credentials.
> At that point you can use the Context.User object and get stuff like .Identity.Name.
>
> - eZe
Galore - 29 Feb 2004 20:48 GMT
Hmm, thanks all, I'll try these sugestions
> If your AD allows to read data for anonymous users such as default iis user
> when you have to turn off anonymous access and turn on Windows
[quoted text clipped - 10 lines]
> >
> > - eZe