ProcessModelSection.UserName プロパティ

定義

Windows ID のユーザー名を示す値を取得または設定します。

public:
 property System::String ^ UserName { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("userName", DefaultValue="machine")]
public string UserName { get; set; }
[<System.Configuration.ConfigurationProperty("userName", DefaultValue="machine")>]
member this.UserName : string with get, set
Public Property UserName As String

プロパティ値

ユーザー名。 既定値は Machine です。

属性

次のコード例は、 UserName プロパティにアクセスする方法を示しています。


// Get the current UserName property value.
string userName = 
  processModelSection.UserName;

// Set the UserName property to "CustomUser".
processModelSection.UserName = "CustomUser";
' Get the current UserName property value.
   Dim userName As String = _
   processModelSection.UserName

' Set the UserName property to "CustomUser".
processModelSection.UserName = "CustomUser"

注釈

存在する場合、 UserName は既定のプロセスとは異なる Windows ID を定義します。 この ID は、ASP.NET worker プロセスを実行するために使用されます。

既定では、 UserName は特別な値のマシンに設定され、プロセスは ASPNET という名前のユーザー アカウントで実行されます。このプロセスは、ASP.NET のインストール時に自動的に作成されます。

Password プロパティは、UserName プロパティと共に使用する必要があります。

これらのプロパティ値が存在する場合、ワーカー プロセスは構成済みの Windows ID で実行されます。

Note

UserNameプロパティが System に設定され、パスワード AutoGenerate が設定されている場合、プロセスを管理アカウントとして実行するエンティティが定義され、プロセスで実行されているすべての ASP.NET ユーザー コードに完全な管理特権が付与されます。 そのため、許可されているアクセス許可については、この場合に細心の注意を払います。

適用対象