Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Getting the ComputerName on the Server

  Asked By: Tracey    Date: Jul 11    Category: Asp.net    Views: 816
  

I have some logic that will behave differently based on the
ServerName.

The request.servervariables("server_name") - returns localhost in the
testing environment so I need a way to get the actual computername.

I saw some site using Windows Scripting Host component WSH to get the
Computername.
Is this the preferred method ?
If so do I have to add the WSH component to the project references to
use it ? COM INTEROP

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Bernard Gutierrez     Answered On: Jul 11

How about Environment.MachineName?

 
Didn't find what you were looking for? Find more on Getting the ComputerName on the Server Or get search suggestion and latest updates.




Tagged: