System.Web Namespace HttpServerUtility Class
Gets the server's computer name.
[ VB ]
Public ReadOnly Property MachineName As String
[ C# ]
public string MachineName {get;}
[ C++ ]
public: __property String* get_MachineName ( );
[ JScript ]
public function get MachineName ( ) : String;
The name of the local computer.
Exception Type |
Condition |
HttpException |
Occurs when the computer name cannot be found. |
The following example shows the simplest way to retrieve and display the ApplicationPath for the current URL request.
<%= Server.MachineName %>
And which, for this page, returns the following:
PLESKPANEL
Show me
.NET Framework Security:
HttpServerUtility Members