sUser = Request.ServerVariables("LOGON_USER")
i = InStr(sUser, "\")
If i > 0 Then
    sDomain = Left(sUser, i - 1)
    sUser = Mid(sUser, i + 1)
End If

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 02 September 2004 12:30
To: [EMAIL PROTECTED]
Subject: Re: [ASP] Windows Logon Credentials


I would love to get a look at that code!

Soren





Mark E <[EMAIL PROTECTED]>
09/01/2004 04:05 PM
Please respond to active-server-pages
 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [ASP] Windows Logon Credentials


How I accomplish this at work:
 
1) Open IIS
2) Right-click your virtual directory
3) Select Properties
4) Go to the Directory Security tab
5) Click the Edit button under "Anonymous access and authentication 
control"
6) Uncheck "Anonymouds access"
 
This means that the visitor will not browse using the IUSR_<server_name> 
account.
 
Then use Request.ServerVariables("AUTH_USER") to return the domain login.
 
I have the code at work and I can't recall the entire function that I use 
since it strips off the "Domain\" of the "Domain\UserName" value.  Let me 
know if you want it and I will shot it over to you tomorrow.
 
HTH,
Mark

wilgf <[EMAIL PROTECTED]> wrote:
Hi.  I just wanted to know if there is a way to use ASP to determine 
the windows logon name of the currently logged in user on an 
anonymous client visiting an asp server?

That sounds confusing even to me.  Let me try again.

A fellow logs onto windows 2000 using his domain account.  He opens 
up a web browser and surfs to my asp enabled web page.

Is there any way I can write an asp page to GRAB that windows logon?

ASP Server Variables only get the ip address of the local machine.  I 
wanted to know who was LOGGED IN.

is there a way to get that info?  Myabe even via javascript and 
submitting it to the server with hidden form variables?

Has anyone done this?

Thanks :)



--------------------------------------------------------------------- 
Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post       : [EMAIL PROTECTED]
Subscribe  : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 


Yahoo! Groups Sponsordocument.write('');

---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
 
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]




--------------------------------------------------------------------- 
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




[Non-text portions of this message have been removed]




---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 


The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to