First, you have to force logon, otherwise the user is IUSR. To do this, turn
off anonymous access. You can now use a variety of methods to pull up the
user Identity. The easiest is Request.ServerVariables["LOGON_USER"]. Since
domain can show up, I use a routine like so:
private string GetUserNumber()
{
// Set up character(s) to split on
char splitChar = '\\';
// Split user to get user ID only
string[] user = Request.ServerVariables["LOGON_USER"].Split(splitChar);
int userArrayMax = user.Length-1;
// This is designed for lookup of user
return user[userArrayMax];
}
You only want the part after the whack for user identity ... unless you also
have multiple domains and need that portion as well.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************** ********************
Think Outside the Box!
************************************************** ********************
"Fabiano" <fm****@ctf.com.br> wrote in message
news:ed**************@TK2MSFTNGP11.phx.gbl...
Please,
I need to control the user acess into my intranet pages. Is there a way i
can get the current user logged at my network, that is acessing a specific
page?
My idea is to get the user login, if it was nnn let the user access
otherwise block data.
Tks in adv.
Fabiano