.NETGURU
User name
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-adsi' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>User name</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi all,</FONT>
</P>

<P><FONT SIZE=3D2>I use to be able to do this with vbscript and now I =
don't have a clue.</FONT>
</P>

<P><FONT SIZE=3D2>I am running a NT4 domain with PDC and BDC and I need =
to retrieve the users full name that is viewing that page </FONT>
</P>

<P><FONT SIZE=3D2>E.G. Joe Soap</FONT>
</P>

<P><FONT SIZE=3D2>Here is the code I use to use:</FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>?>>>>>>>>>>>>>>>&g=
t;>>START<<<<<<<<<<<<<<&=
lt;<<<<<,</FONT>
<BR>        <FONT =
SIZE=3D2><%</FONT>
<BR><FONT SIZE=3D2>    sFullUser =3D =
trim(Request.ServerVariables ("LOGON_USER"))</FONT>
<BR><FONT SIZE=3D2>if len(sFullUser) =3D 0 then</FONT>
<BR><FONT SIZE=3D2>Response.Write "You need to disable anonymous =
access for this code to work."</FONT>
<BR><FONT SIZE=3D2>Response.End</FONT>
<BR><FONT SIZE=3D2>End if </FONT>
<BR><FONT SIZE=3D2>'response.write sFullUser</FONT>
<BR><FONT SIZE=3D2>iPos =3D InStr(sFullUser, "\")</FONT>
<BR><FONT SIZE=3D2>sDomain =3D Left(sFullUser, iPos - 1)</FONT>
<BR><FONT SIZE=3D2>sUser =3D Mid(sFullUser, iPos + 1)</FONT>
</P>

<P><FONT SIZE=3D2>Set objUser =3D GetObject("WinNT://" & =
sDomain & "/" & sUser)</FONT>
</P>

<P><FONT =
SIZE=3D2>>>>>>>>>>>>>>>>>=
;>>>>>>>END<<<<<<<<<<=
<<<<<<<<<<<<<<<<<<=
<<</FONT>
</P>

<P><FONT SIZE=3D2>How can I get that into VB.net any help??????</FONT>
</P>

<P><FONT SIZE=3D2>Thank you </FONT>
</P>

<P><FONT SIZE=3D2>Carlos</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
    
Charles Oppermann (VIP)
You may want to try the "regular" ADSI message list.

Charles Oppermann
Program Manager, Windows Server User Assistance

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 16, 2002 9:33 AM
To: ngfx-adsi
Subject: [ngfx-adsi] User name

Hi all,

I use to be able to do this with vbscript and now I don't have a clue.

I am running a NT4 domain with PDC and BDC and I need to retrieve the
users full name that is viewing that page

E.G. Joe Soap

Here is the code I use to use:

?>>>>>>>>>>>>>>>>>>START<<<<<<<<<<<<<<<<<<<<,
<%
sFullUser = trim(Request.ServerVariables ("LOGON_USER"))
if len(sFullUser) = 0 then
Response.Write "You need to disable anonymous access for this code to
work."
Response.End
End if
'response.write sFullUser
iPos = InStr(sFullUser, "\")
sDomain = Left(sFullUser, iPos - 1)
sUser = Mid(sFullUser, iPos + 1)

Set objUser = GetObject("WinNT://" & sDomain & "/" & sUser)

>>>>>>>>>>>>>>>>>>>>>>>END<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

How can I get that into VB.net any help??????

Thank you

Carlos

| [ngfx-adsi] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-adsi.asp = JOIN/QUIT

------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address For more information about Trencor, visit
www.trencor.net
Reply to this message...
 
    
Davis, Joe
Are you wanting to know how to get the LOGON_USER or do you want to know how
to get the user entry from directory svcs?

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 16, 2002 9:33 AM
To: ngfx-adsi
Subject: [ngfx-adsi] User name

Hi all,

I use to be able to do this with vbscript and now I don't have a clue.

I am running a NT4 domain with PDC and BDC and I need to retrieve the users
full name that is viewing that page

E.G. Joe Soap

Here is the code I use to use:

?>>>>>>>>>>>>>>>>>>START<<<<<<<<<<<<<<<<<<<<,
<%
sFullUser = trim(Request.ServerVariables ("LOGON_USER"))
if len(sFullUser) = 0 then
Response.Write "You need to disable anonymous access for this code to work."

Response.End
End if
'response.write sFullUser
iPos = InStr(sFullUser, "\")
sDomain = Left(sFullUser, iPos - 1)
sUser = Mid(sFullUser, iPos + 1)

Set objUser = GetObject("WinNT://" & sDomain & "/" & sUser)

>>>>>>>>>>>>>>>>>>>>>>>END<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

How can I get that into VB.net any help??????

Thank you

Carlos

| [ngfx-adsi] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-adsi.asp = JOIN/QUIT
------------------------------------------------------------- This email and
any files transmitted are confidential and intended solely for the use of
the individual or entity to which they are addressed, whose privacy should
be respected. Any views or opinions are solely those of the author and do
not necessarily represent those of the Trencor Group, or any of its
representatives, unless specifically stated. Email transmission cannot be
guaranteed to be secure, error free or without virus contamination. The
sender therefore accepts no liability for any errors or omissions in the
contents of this message, nor for any virus infection that might result from
opening this message. Trencor is not responsible in the event of any third
party interception of this email. If you have received this email in error
please notify Click here to reveal e-mail address For more information about Trencor,
visit www.trencor.net
Reply to this message...
 
    
Carlos Magalhaes
What I am trying to retrieve is the Full Name (in our company the users log
in name is his name and the first letter of his surname) So finidng his log
on name with the uiser.identiy wouldn't work for me I am trying to find his
Full Name.

Remembering that I have a NT4 domain and no AD.

HTH ?

Carlos

-----Original Message-----
From: Davis, Joe [mailto:Click here to reveal e-mail address]
Sent: Friday, May 17, 2002 1:28 AM
To: ngfx-adsi
Subject: [ngfx-adsi] RE: User name

Are you wanting to know how to get the LOGON_USER or do you want to know how
to get the user entry from directory svcs?

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 16, 2002 9:33 AM
To: ngfx-adsi
Subject: [ngfx-adsi] User name

Hi all,

I use to be able to do this with vbscript and now I don't have a clue.

I am running a NT4 domain with PDC and BDC and I need to retrieve the users
full name that is viewing that page

E.G. Joe Soap

Here is the code I use to use:

?>>>>>>>>>>>>>>>>>>START<<<<<<<<<<<<<<<<<<<<,
<%
sFullUser = trim(Request.ServerVariables ("LOGON_USER"))
if len(sFullUser) = 0 then
Response.Write "You need to disable anonymous access for this code to work."

Response.End
End if
'response.write sFullUser
iPos = InStr(sFullUser, "\")
sDomain = Left(sFullUser, iPos - 1)
sUser = Mid(sFullUser, iPos + 1)

Set objUser = GetObject("WinNT://" & sDomain & "/" & sUser)

>>>>>>>>>>>>>>>>>>>>>>>END<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

How can I get that into VB.net any help??????

Thank you

Carlos

| [ngfx-adsi] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-adsi.asp = JOIN/QUIT
------------------------------------------------------------- This email and
any files transmitted are confidential and intended solely for the use of
the individual or entity to which they are addressed, whose privacy should
be respected. Any views or opinions are solely those of the author and do
not necessarily represent those of the Trencor Group, or any of its
representatives, unless specifically stated. Email transmission cannot be
guaranteed to be secure, error free or without virus contamination. The
sender therefore accepts no liability for any errors or omissions in the
contents of this message, nor for any virus infection that might result from
opening this message. Trencor is not responsible in the event of any third
party interception of this email. If you have received this email in error
please notify Click here to reveal e-mail address For more information about Trencor,
visit www.trencor.net

| [ngfx-adsi] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-adsi.asp = JOIN/QUIT

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification