Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / December 2003

Tip: Looking for answers? Try searching our database.

Environment.UserDomainName incorrect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BRC - 22 Dec 2003 23:00 GMT
I'm getting the user's name instead of the domain name
when I make the following call on a Windows 2000
Workstation:

String sourceServer = Environment.UserDomainName;

I have a second Windows 2000 workstation that works
correctly.  

Why?
Jim Hughes - 23 Dec 2003 15:47 GMT
Here is some info that was discussed earlier this month, maybe it applies to
your situation?

> Hi Stephen,

> Thank you for you report.

> After I have done a deeper research, the behavior will occur only if

> there is a same local account with the domain account. i.e. when you

> have a domain account domain\user1 and a local account user1. When you

> logon to the domain with the domain account domain\user1, the problem

> will persists.

> I have reported the problem to our product team, but I can not

> guarantee

if

> or when it will be fixed.

> Now you can follow the Jim's workaround

> or

> Environment.ExpandEnvironmentVariables("%USERDOMAIN%")

> If you have concern on this issue,please post here.

> Regards,

> Peter Huang

> Microsoft Online Partner Support

> Get Secure! www.microsoft.com/security

> This posting is provided "as is" with no warranties and confers no

> rights.

> I'm getting the user's name instead of the domain name
> when I make the following call on a Windows 2000
[quoted text clipped - 6 lines]
>
> Why?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.