共用方式為


DefaultSettingsSection.DistributedTransactionManagerName 屬性

定義

取得異動管理員的名稱。

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

屬性值

String

異動管理員的名稱。 預設值為空字串。

屬性

例外狀況

嘗試將這個屬性設定為完整網域名稱或 IP 位址。

嘗試將這個屬性設為 localhost。

備註

此屬性包含正在執行 Microsoft Distributed Transaction Coordinator (MSDTC) 的電腦名稱稱,負責協調在本機啟動的所有分散式交易。

您可以設定這個屬性的值,以啟用中的遠端交易管理員 System.Transactions 。 如果這個屬性為 null 或包含空字串,則會使用本機交易管理員做為遠端交易管理員。 如果您將此屬性設定為預設空字串以外的值,您必須安裝 Windows Server 2003 Service Pack 1。 否則,任何交易式作業都會失敗 NotSupportedException 。 升級為由 MSDTC 所管理的交易將不會使用本機 MSDTC,而是使用此屬性所指定電腦上的。 如果該交易管理員基於任何原因而無法使用,則會擲回例外狀況。

這個屬性不區分大小寫,而且只能包含電腦的簡短名稱。 它不接受完整功能變數名稱(localhost 或 IP 位址)。 如果此屬性包含不正確遠端電腦名稱稱,則會擲回「無法讀取設定資訊」例外狀況。

您應該具有適當的安全性許可權,才能使用遠端 MSDTC。 如需有關如何設定 DTC 安全性設定的詳細資訊,請參閱設定 MSDTC 安全性屬性 一文。

適用於