Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get a domain name?

Status
Not open for further replies.

passs

Programmer
Dec 29, 2003
170
RU
Hello everybody!

Does anybody know how to get a domain name?
I need to get server name and domain, but with:
string strHostName = Dns.GetHostName().ToString();
I recieve only local server name.

Thanks,
Alexander
 
Could you not just use one of the ServerVariables? e.g.
Code:
Request.QueryString("HTTP_HOST")


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top