System.Net.NetworkCredential.Domain Property

Gets or sets the domain or computer name that verifies the credentials.

Syntax

public string Domain { get; set; }

Value

A string containing the name of the domain that verifies the current credentials.

Remarks

The NetworkCredential.Domain property specifies the domain or realm to which the user name belongs. Typically, this is the host computer name where the application runs or the user domain for the currently logged in user.

Permissions

TypeReason
System.Security.Permissions.EnvironmentPermissionRequires read access to the environment variable that contains the domain name. See System.Security.Permissions.EnvironmentPermissionAccess.Read.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0