HttpServerUtility.MachineName Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the server's computer name.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

Public ReadOnly Property MachineName As String

Property Value

Type: System.String

The name of the local computer.

Exception Condition
HttpException

The computer name cannot be found.

The following example stores the server's computer name as a string variable.

Dim ThisMachine As String
ThisMachine = Server.MachineName

.NET Framework
Available since 1.1
Return to top
Show: