473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Username on client computer

EMW
Hi,

For tracing and other thing I need to know the username of the user who is
logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric
Nov 18 '05 #1
6 2268
What security are you using on your .aspx page?
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hi,

For tracing and other thing I need to know the username of the user who is
logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric

Nov 18 '05 #2
EMW
none as fas as I know....
What exactly do you mean?

"Rick Spiewak" <ri*********@mindspring.com> schreef in bericht
news:el**************@TK2MSFTNGP12.phx.gbl...
What security are you using on your .aspx page?
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hi,

For tracing and other thing I need to know the username of the user who is logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric


Nov 18 '05 #3
For example, are you using
<authentication mode="Forms" >
or
<authentication mode="Windows" >

"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
none as fas as I know....
What exactly do you mean?

"Rick Spiewak" <ri*********@mindspring.com> schreef in bericht
news:el**************@TK2MSFTNGP12.phx.gbl...
What security are you using on your .aspx page?
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hi,

For tracing and other thing I need to know the username of the user
who
is logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric



Nov 18 '05 #4
assuming that you're not using ASP.NET forms authentication mode,
(if you do, you can get username from session)
try using this code:

Dim userName() As String = Split(HttpContext.Current.User.Identity.Name,"\")
userName(0) '// contains Machine name or Domain name
userName(1) '// contains Username

--
Hope this helps,
Zeeshan Mustafa, MCSD
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hi,

For tracing and other thing I need to know the username of the user who is
logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric


Nov 18 '05 #5
EMW
thanks!

"M. Zeeshan Mustafa" <ze*****@no-spm.please.zeeshan.net> schreef in bericht
news:%2****************@TK2MSFTNGP10.phx.gbl...
assuming that you're not using ASP.NET forms authentication mode,
(if you do, you can get username from session)
try using this code:

Dim userName() As String = Split(HttpContext.Current.User.Identity.Name,"\") userName(0) '// contains Machine name or Domain name
userName(1) '// contains Username

--
Hope this helps,
Zeeshan Mustafa, MCSD
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
Hi,

For tracing and other thing I need to know the username of the user who is logged in to the pc on which (s)he is running my ASPX page.

I was using:
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
But that provides me with: SERVERNAME\ASPNET

I was hoping for the windows login name of the user.

Is there another way to get this?

rg,
Eric



Nov 18 '05 #6
EMW
thanks!

"Rick Spiewak" <ri*********@mindspring.com> schreef in bericht
news:un**************@tk2msftngp13.phx.gbl...
For example, are you using
<authentication mode="Forms" >
or
<authentication mode="Windows" >

"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
none as fas as I know....
What exactly do you mean?

"Rick Spiewak" <ri*********@mindspring.com> schreef in bericht
news:el**************@TK2MSFTNGP12.phx.gbl...
What security are you using on your .aspx page?
"EMW" <SomeOne@MicroSoftdotCom> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
> Hi,
>
> For tracing and other thing I need to know the username of the user

who
is
> logged in to the pc on which (s)he is running my ASPX page.
>
> I was using:
> System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
> But that provides me with: SERVERNAME\ASPNET
>
> I was hoping for the windows login name of the user.
>
> Is there another way to get this?
>
> rg,
> Eric
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TIML | last post by:
I have tried using servervariables("XXX") to request the username and computer name of the individual running code on our internal server, but what I want and can't seem to capture is the user's...
4
by: alien2_51 | last post by:
Greetings, I apologize for the cross post I posted previously to .Net Framework with no replies... I have an application server that potentially will service all enterprise applications from...
0
by: Joey Edelstein | last post by:
Hi, We are trying to add a Client Certificate support for our web app that emulates a hardware device web app. The hardware uses a 2 factors authentication, which requires a Web Service client...
14
by: Brent Burkart | last post by:
I am trying to capture the Windows Authenticated username, but I want to be able to capture the login name that exists in IIS, not Windows. In order to enter my company's intranet through the...
2
by: news.microsoft.com | last post by:
Hello, I want to create a program that will monitor the usage of a particular file and record the date, time, and username of the person who modified the file. The FileSystemWatcher Class...
18
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site...
0
by: Sid DeLuca | last post by:
I'm modifying the WSE2 HOL sample to develop my web service. I'm able to get the client application's username token encrypted on the way out (outputTrace.webinfo), but not on receipt from the...
1
by: kowndinya | last post by:
i want to know the username who is working on a particular computer.(Remote computer) I know already the computer name which is listed in a combo box. Is there any way to get username? please...
10
by: =?Utf-8?B?SGVsZW4gVHJpbQ==?= | last post by:
I am developing a web application in Visual Studio 2003, .NET 1.1 to run on our intranet. I want to identify users to save them logging in. The line: UserName = Environment.UserName is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.