RoleServiceManager.Path 屬性

定義

取得或設定角色服務的路徑。

public:
 property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
public string Path { get; set; }
member this.Path : string with get, set
Public Property Path As String

屬性值

自訂角色網路服務的路徑。

例外狀況

控制階層中設定了多條獨特路徑。

備註

若未設定屬性 Path ,則回傳值為 String.Empty。 在這種情況下,ASP.NET 會使用內建的認證網路服務,對應以下內部預設路徑:~/RolesService.svc。 同樣的行為也發生在 Path 空字串或 null

Path 可以在控制項 ScriptManager 或相關的 ScriptManagerProxy 控制項中指定。 當 Path 設定在 層 ScriptManagerProxy 級時,以下條件成立:

  • 如果控制階層中有多個代理物件, Path 則不必為每個代理實例設定。

  • 如果 Path 是明確設定給代理物件,則該值必須對所有其他代理物件相同。 如果你在控制層級中為不同的代理物件設定不同路徑, ArgumentException 就會拋出例外。

適用於