Hi Vadym,
If you use windows authentication and deny anonymous access:
In web.config
<authentication mode="Windows" />
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
Then you can use
Context.User.Identity.Name
to get Domain/userID.
And use
Context.User.IsInRole(strRole)
to perform role checking.
HTH
Elton Wang
"Vadym Stetsyak" wrote:
> Hi there!
> Is it possible to retieve user nt name from the web request? This question
> arose while thinking about authentication system implementation in the
> asp.net.
>
> I want to make authentication process transparent for the user. E.g. if the
> user is logged on the domain or is a member of the domain then perform
> authentication autimatically - as a result user won't experience any login
> windows, otherwise web-app will provide the form similar the IIS one for
> authentication.
>
> Can this be done from the web application?
>
> TIA
> --
> Vadym Stetsyak
>
>
>