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 / New Users / July 2005

Tip: Looking for answers? Try searching our database.

SystemInformation.UserDomainName returning inconsistent values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gnik - 13 Jul 2005 14:09 GMT
I am using the System.Windows.Forms.SystemInformation.UserDomainName property
to get the domain name of the logged in user in a database application
written in VB .NET 2003.

The user has recently been migrated to a new domain by our support
department using a process that maintains the SID history for the old domain
account. The user is logged into the new domain when he runs the application.

The UserDomainName property returns the previous domain name most of the
time and only sometimes returns the new domain name under which the user has
logged in. Obviously this is a problem for my application which uses the
domain name to get the user's rights from the database.

Can anyone shed any light on why it's doing this?

Would I be better off using the System.Environment.UserDomain name for this
purpose?
Willy Denoyette [MVP] - 13 Jul 2005 21:14 GMT
Contact your Domain admins, this is not a .NET problem but a problem with
your logon/directory servers.
You can use the System.Environment.UserDomain to get the domain name of the
login domain, but you should only rely on this for Windows applications or
console applications started from within the current interactive logon
session.

Willy.

>I am using the System.Windows.Forms.SystemInformation.UserDomainName
>property
[quoted text clipped - 18 lines]
> this
> purpose?

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.