DefaultSettingsSection.DistributedTransactionManagerName 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得交易管理器的名稱。
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
屬性值
交易管理器的名字。 預設值為空字串。
- 屬性
例外狀況
嘗試將此屬性設定為完全限定的網域名稱或 IP 位址。
嘗試將此屬性設為 localhost。
備註
此屬性包含執行 Microsoft Distributed Transaction Coordinator(MSDTC)並負責協調所有本地啟動分散式交易的電腦名稱。
你可以設定這個屬性的值,以啟用遠端交易管理器。System.Transactions 若此屬性為 null 或包含空字串,則使用本地交易管理器作為遠端交易管理器。 如果你將此屬性設定為非預設空字串的值,你必須安裝 Windows Server 2003 Service Pack 1。 否則,任何交易操作都會失敗。NotSupportedException 升級至由 MSDTC 管理的交易不會使用本地 MSDTC,而是使用該性質所指定的機器上的 MSDTC。 如果該交易管理器因任何原因無法使用,會拋出例外。
此特性不區分大小寫,應僅包含機器的短名稱。 它不接受完全合格的網域名稱、localhost或IP位址。 若此屬性包含無效的遠端機器名稱,則會拋出「無法讀取組態資訊」的例外。
你應該有適當的安全權限才能使用遠端 MSDTC。