473,434 Members | 1,791 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,434 software developers and data experts.

Environment.Username empty - win form app

cc
Under what circumstances for a windows form app will
Environment.Username return empty?
Sep 4 '08 #1
1 3888

"cc" wrote:
Under what circumstances for a windows form app will
Environment.Username return empty?
I don't know. Maybe lacking EnvironmentPermission? Started from a Service
running under Local System or similar account running without logging on?

You could try System.Security.Principal.WindowsIdentity.GetCurre nt().Name
instead.

--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 5 '08 #2

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

Similar topics

3
by: M.E. | last post by:
Hi I have 4 radio buttons. each button to determine which page to go to. But before page open user enters username in a text box. So when submitted, Page opens relevant to that user displaying...
1
by: Chandler Chao | last post by:
I am trying to get the path of a user's Personal folder from within a web form. When I use the call: Environment.GetFolderPath(Environment.SpecialFolder.Personal) I get absolutely nothing...
3
by: William Stacey [MVP] | last post by:
Is this a bug in fx2? I expect they did not carry forward all the StartInfo properties to api used with Username/Password. When you remove UserName/password, the window does not show as expected....
6
by: charliewest | last post by:
In my development environment, the validation controls work fine. (Incidentally, i am using almost all of them). However, when i deploy my ASP.NET application to the live production environment,...
2
by: adam | last post by:
Hi ASP Expert, My goal is to retrieve my local machine's %USERNAME% environment variable from ASP page. When I enter http://RemoteServerName/testusername.asp?id=%USERNAME% directly into the IE...
15
by: Eugene Anthony | last post by:
Is this method of validation for password and username considered to be secured. In my previous post I was given a solution that uses command object and the values are parsed by parameters. But the...
0
by: kowndinya | last post by:
I have created a small program with Data Environment. database is MS Access. It is working fine on my computer where VB 6 was Installed. I want to use this program on different machines where there...
11
by: Kevin O'Brien | last post by:
Hello, I am creating a sign on screen for my application in which I want to store the username and password in a database table. I was thinking of putting a combo box connected to the database...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.