asp.net.ph

Server.MachineName Property

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;

Property Value

The name of the local computer.

Exceptions


Exception Type Condition
HttpException Occurs when the computer name cannot be found.

Example

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:


See Also

HttpServerUtility Members Skip Navigation Links


Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note