WebThreadInformation.ThreadAccountName 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 thread account name.

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

public string ThreadAccountName { get; }

Property Value

Type: System.String

The thread account name.

The account returned by this property might be arbitrary if the thread is executing in impersonation mode.

The following code example shows how to get the thread account name.

// Get the account name.
public string GetThreadAccountName()
{
    return (string.Format(
        "Request user host address: {0}",
        ThreadInformation.ThreadAccountName));
}

.NET Framework
Available since 2.0
Return to top
Show: