473,320 Members | 1,870 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.

Windows Login Name

Hi

How can I get the currently logged in username from windows 2000/xp?

Thanks

Regards

Nov 20 '05 #1
6 822
In article <#0*************@TK2MSFTNGP10.phx.gbl>,
jo**@nospam.infovis.co.uk says...
Hi

How can I get the currently logged in username from windows 2000/xp?


See the WindowsPrincipal.Identity Property.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #2
In article <#0*************@TK2MSFTNGP10.phx.gbl>,
jo**@nospam.infovis.co.uk says...
Hi

How can I get the currently logged in username from windows 2000/xp?


See the WindowsPrincipal.Identity Property.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 20 '05 #3
John,

In addition to Patrick's reply, you can also use Environment.UserName.

HTH,
Gary

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Hi

How can I get the currently logged in username from windows 2000/xp?

Thanks

Regards

Nov 20 '05 #4
John,

In addition to Patrick's reply, you can also use Environment.UserName.

HTH,
Gary

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Hi

How can I get the currently logged in username from windows 2000/xp?

Thanks

Regards

Nov 20 '05 #5
Gary,

* "Gary Milton" <an*******@discussions.microsoft.com> scripsit:
In addition to Patrick's reply, you can also use Environment.UserName.


.... and 'SystemInformation.UserName'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #6
Gary,

* "Gary Milton" <an*******@discussions.microsoft.com> scripsit:
In addition to Patrick's reply, you can also use Environment.UserName.


.... and 'SystemInformation.UserName'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #7

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

Similar topics

1
by: sherkozmo | last post by:
I have my SQL 7.0 server set for Mixed security. I see now (finally) the advantages of having windows authentication security for windows groups. I do most of my developing in Access Projects...
3
by: tbone | last post by:
We were using sql authentication on our sql server 2000 servers, But need to use windows authentication. I have an sql user jdoe that owns many different objects in multiple databases. I have...
3
by: Neil Ginsberg | last post by:
Is it possible to use a Windows 2000 log-in as the log-in for Access user-level security, thus circumventing the Access prompt? Neil
8
by: Nils Magnus Englund | last post by:
Hello, I am having trouble using Integrated Windows Authentication between our intranet server and our database server, both of which are on our local domain. Windows authentication works for...
11
by: Eric | last post by:
Hello, I have a web app that uploads files to a file server (different box than the web server). The application uses NT integrated authentication, but no users should have permissions to the...
3
by: serge calderara | last post by:
Dear all, I clearly underdand the advantage of both type of authentification but is it allowed or possible to set the Authentication mode to Windows and then handle a login form for defined...
6
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, We have a requirement where we have to develop a custom Login Page which will accept user's NT credentials ( Username , password, domain name). This then needs to be passed to a website...
1
by: roshina | last post by:
Hi Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server. All the validations are ok but the new password is not upadated in the data...
1
by: thaixyz | last post by:
Hi, I am migrating SQL 2000 database from one machine to another using the detach/attach method. I used the TSQL script sp_help_revlogin procedure provided by microsoft to copy the logins, this...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
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...

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.