[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Domain Controller name!

Posted on 2004-10-21
4
Medium Priority
?
555 Views
Last Modified: 2008-03-04
Does anyone know how to find the name of the Domain Controller that my system uses to log me in? I want a programatic way to find this info.
Pl help!!
0
Comment
Question by:kunjachan_
2 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 252 total points
ID: 12372137
Try this,

String logonName = WindowsIdentity.GetCurrent().Name;
String domainName = logonName.Substring( 0, logonName.IndexOf(@"\") );
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 248 total points
ID: 12377873
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

608 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question