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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the Server Name 1

Status
Not open for further replies.

RichS

Programmer
Apr 24, 2000
380
US
I would like to display the name of the web server being used in a C# asp.net page. Does anyone know how to do this?

Rich
 
You can get the machine name from the Server object.
Code:
string name = Page.Server.MachineName;
Rob

Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Eisenhower 1953
 
Rob,
I knew it was something easy.
Thanks.
Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top