Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpServerUtility::MachineName Property

 

Gets the server's computer name.

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

public:
property String^ MachineName {
	[AspNetHostingPermissionAttribute(SecurityAction::Demand, Level = AspNetHostingPermissionLevel::Medium)]
	String^ get();
}

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft