WCF 使用 WSAtomicTransaction11 分散式交易 Oracle

來源:互聯網
上載者:User

情境:在WCF 的通訊中 使用 WSAtomicTransaction11  來管理Oracle的分散式交易,有一篇外文文檔參考

MakeCert.exe   wsatui.dll
下載(包含64位,32位)

1. 添加信任認證

使用Windows SDKs的工具MakeCert.exe,為MachineA和MachineB產生X.509認證(分別稱為CertA和CertB)
      makecert  -ss My –sr LocalMachine –pe –r –sky
exchange–n CN=MachineA
      這裡需要注意的是"CN=MachineA"中的伺服器名。
2、在MachineA中,從認證中的電腦帳號Trusted
Root Certificate Authority Node區到處認證CertA,並匯入到Personal 地區(匯出時需要同時匯出私密金鑰)。在MachineB也做同樣的操作。

4、在MachineA將CertA的公開金鑰匯出到檔案CertA.cer,並匯入到MachineB的電腦帳號中的Trusted Root Certificate Authority Node地區和Personal地區。同樣將CertB的公開金鑰匯出到MachineA的電腦帳號中的Trusted
Root Certificate Authority Node地區和Personal地區。

將MachinaA的私密金鑰匯入到MachinaA
的Trusted Root Certificate Authority Node地區

將MachinaB的私密金鑰匯入到MachinaB 的Trusted
Root Certificate Authority Node地區

5、配置MSDTC,啟用WS-AT協議。
      註冊程式集wsatui.dll(可以在Windows SDKs的bin目錄找到該檔案,預設安裝目錄是C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin),執行命令:
      regasm /codebase C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\wsatui.dll

Note:The wsatui.dll has to match the operation system bit version, e.g.  x86 operation system should register the x86version wsatui.dll.

6、執行了上面的操作後,開啟MSDTC的配置,就會看到多了一個WS-AT的Tab。在裡面配置一下相關的參數:
         (1)選擇啟用WS-AT
         (2)設定Https連接埠,預設是443
         (3)設定Endpoint Certificate,對於MachineA,選擇CertA,對於MachineB,選擇CertB
         (4)設定Authorized certificates,對於MachineA,選擇CertB,對於MachineA,選擇CertA(如果有多台伺服器參與分散式交易,可以選擇多個cert) 
     



到此為止已經配置好啟用WS-AT協議了,接下來就可以寫WCF程式來跑跑WS-AT協議了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.