Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Network Username

Reply
Thread Tools

Network Username

 
 
Geoff Murley
Guest
Posts: n/a
 
      04-26-2005
Is there a simple command I can use to retrieve the
username of the user currently logged onto a client PC,
viewing my ASP.NET page?

I really want the ASP.NET equivalent of
SystemInformation.UserName
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      04-26-2005
HttpContext.Current.User.Identity.Name, or just User.Identity.Name in the
context of a page. This assumes you're using Windows authentication in your
ASP.NET app.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Is there a simple command I can use to retrieve the username of the
> user currently logged onto a client PC, viewing my ASP.NET page?
>
> I really want the ASP.NET equivalent of SystemInformation.UserName
>




 
Reply With Quote
 
 
 
 
Geoff Murley
Guest
Posts: n/a
 
      04-26-2005
Hi, I am using Windows authentication , however, both of
your suggestions return an empty string. Is there
something else I should check?

>-----Original Message-----
>HttpContext.Current.User.Identity.Name, or just

User.Identity.Name in the
>context of a page. This assumes you're using Windows

authentication in your
>ASP.NET app.
>
>-Brock
>DevelopMentor
>http://staff.develop.com/ballen
>
>
>
>> Is there a simple command I can use to retrieve the

username of the
>> user currently logged onto a client PC, viewing my

ASP.NET page?
>>
>> I really want the ASP.NET equivalent of

SystemInformation.UserName
>>

>
>
>
>.
>

 
Reply With Quote
 
Geoff Murley
Guest
Posts: n/a
 
      04-26-2005
I've got it to work now. I didn't turn off Allow
Anonymous access in IIS.

Thanks for your help.

>-----Original Message-----
>Hi, I am using Windows authentication , however, both of
>your suggestions return an empty string. Is there
>something else I should check?
>
>>-----Original Message-----
>>HttpContext.Current.User.Identity.Name, or just

>User.Identity.Name in the
>>context of a page. This assumes you're using Windows

>authentication in your
>>ASP.NET app.
>>
>>-Brock
>>DevelopMentor
>>http://staff.develop.com/ballen
>>
>>
>>
>>> Is there a simple command I can use to retrieve the

>username of the
>>> user currently logged onto a client PC, viewing my

>ASP.NET page?
>>>
>>> I really want the ASP.NET equivalent of

>SystemInformation.UserName
>>>

>>
>>
>>
>>.
>>

>.
>

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      04-26-2005
Check in IIS that you've disabled anonymous authentication for your application.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Hi, I am using Windows authentication , however, both of your
> suggestions return an empty string. Is there something else I should
> check?
>
>> -----Original Message-----
>> HttpContext.Current.User.Identity.Name, or just

> User.Identity.Name in the
>
>> context of a page. This assumes you're using Windows
>>

> authentication in your
>
>> ASP.NET app.
>>
>> -Brock
>> DevelopMentor
>> http://staff.develop.com/ballen
>>> Is there a simple command I can use to retrieve the
>>>

> username of the
>
>>> user currently logged onto a client PC, viewing my
>>>

> ASP.NET page?
>
>>> I really want the ASP.NET equivalent of
>>>

> SystemInformation.UserName
>
>> .
>>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set username to "system" in machine.config, but ASP.NET running as NETWORK SERVICE wizofaus@hotmail.com ASP .Net 3 01-02-2007 11:35 PM
loginview control displays network username instead of (web) username Shailesh Patel ASP .Net Web Controls 0 11-08-2006 08:19 PM
Bypass username/password dialog when accessing remote network thoducng@gmail.com ASP .Net 1 10-17-2005 09:07 PM
Change the username found in "C:\Documents and Settings\Username" The Reluctant Robot Named Jude Computer Support 1 05-05-2004 07:11 AM
how do I get a handle on username in MS network? NotGiven ASP General 1 01-21-2004 09:26 PM



Advertisments