Hi, is there any way to know the user account of the pc who is visiting an
asp page?
I'm gonna use it in the intranet of my job.
Thanks for your comments.

Re: How to get the user account by Rafael

Rafael
Wed Apr 06 20:53:31 CDT 2005

Cris,
Usually all non-autenticated users accessing a web page use the
IUSR_computerName account.
If you want to know the actual user account, you will need to ask the user
to log in.


hope this helps,
RT

"Cris I." <CrisI@discussions.microsoft.com> wrote in message
news:C5C20C37-9F72-40D9-A434-4B7CDEE15F49@microsoft.com...
> Hi, is there any way to know the user account of the pc who is visiting an
> asp page?
> I'm gonna use it in the intranet of my job.
> Thanks for your comments.



Re: How to get the user account by CrisI

CrisI
Thu Apr 07 10:09:11 CDT 2005

Hi Rafael, it's true what you say, but i'm suposing that the users are logged
in...
I have this code

With CreateObject( "WScript.Network" )
computername = .computername
End With
set myobject = getobject("winmgmts:\\" & computername & "\root\cimv2")
set myobject2 = myobject.get("win32_computersystem.name='" & computername
&"'")
user = myobject2.username
response.write(user)

But it returns the user account of the server where my asp page is, and not
the user who is visiting the page.
Thanks.

"Rafael T" wrote:

> Cris,
> Usually all non-autenticated users accessing a web page use the
> IUSR_computerName account.
> If you want to know the actual user account, you will need to ask the user
> to log in.
>
>
> hope this helps,
> RT
>
> "Cris I." <CrisI@discussions.microsoft.com> wrote in message
> news:C5C20C37-9F72-40D9-A434-4B7CDEE15F49@microsoft.com...
> > Hi, is there any way to know the user account of the pc who is visiting an
> > asp page?
> > I'm gonna use it in the intranet of my job.
> > Thanks for your comments.
>
>
>

Re: How to get the user account by Rafael

Rafael
Fri Apr 08 00:44:01 CDT 2005

Your code executes locally, so it grabs the user account for the account
logged on to the computer. To grab the user account from the person coming
from the internet, you need ASP code to get it.

I remember seen it somewhere but don't have it with me. I will look around
and post again if I get it.

Rafael
"Cris I." <CrisI@discussions.microsoft.com> wrote in message
news:8A3A8375-C8FE-4893-9840-0E2C69952DD3@microsoft.com...
> Hi Rafael, it's true what you say, but i'm suposing that the users are
> logged
> in...
> I have this code
>
> With CreateObject( "WScript.Network" )
> computername = .computername
> End With
> set myobject = getobject("winmgmts:\\" & computername & "\root\cimv2")
> set myobject2 = myobject.get("win32_computersystem.name='" & computername
> &"'")
> user = myobject2.username
> response.write(user)
>
> But it returns the user account of the server where my asp page is, and
> not
> the user who is visiting the page.
> Thanks.
>
> "Rafael T" wrote:
>
>> Cris,
>> Usually all non-autenticated users accessing a web page use the
>> IUSR_computerName account.
>> If you want to know the actual user account, you will need to ask the
>> user
>> to log in.
>>
>>
>> hope this helps,
>> RT
>>
>> "Cris I." <CrisI@discussions.microsoft.com> wrote in message
>> news:C5C20C37-9F72-40D9-A434-4B7CDEE15F49@microsoft.com...
>> > Hi, is there any way to know the user account of the pc who is visiting
>> > an
>> > asp page?
>> > I'm gonna use it in the intranet of my job.
>> > Thanks for your comments.
>>
>>
>>