我想使用免費的Microsoft Visual Web Developer 2010 Express在WCF中開始事務。它給了我創建一個「WCF服務應用程序」的選項,但它似乎沒有給我很多選項來託管它或配置不同的綁定。如果我F5的項目,我得到的錯誤:來自Visual Studio 2010 Express的WCF中的TransactionFlow
At least one operation on the 'Service' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding 'BasicHttpBinding' is not configured with a TransactionFlowBindingElement. The TransactionFlowAttribute attribute set to Mandatory cannot be used without a TransactionFlowBindingElement.
我嘗試添加在*/services/service/endpoint
配置到web.config中,但它似乎只是被忽略。我也嘗試將默認啓動應用程序更改爲WcfSvcHost.exe,但此選項呈灰色。我開始懷疑Express版的一些失敗,但我樂觀地認爲,這只是我的一個愚蠢。是否有一個我需要學習的技巧,或者會在Visual Studio 2010的完整版本上冒出來,足以讓我跨越這個障礙到達下一個?
謝謝!
,你能否告訴我們的服務合同,配置文件? –
我正在使用「WCF服務應用程序」中的香草示例,只有我向服務合同中的某個操作添加了TransactionFlow屬性。 Web.config中沒有定義任何服務。我不知道反射魔法是怎麼回事,但即使我嘗試使用wsHttpBinding設置端點(注意錯誤消息始終是BasicHttpBinding),但我沒有運氣。 – Jono