473,406 Members | 2,345 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,406 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 1123
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.