我已經開發了一個小工具來上傳工資信息給瑞士政府,並且我使用了WSE 3.0成功。但現在,我的一個客戶報告說,他的機器上,我的程序崩潰與下面的堆棧跟蹤:WSE032錯誤,WebServicesConfiguration無法加載配置。部分
WSE032: There was an error loading the microsoft.web.services3 configuration section.
at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()
at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_MessagingConfiguration()
at Microsoft.Web.Services3.WebServicesClientProtocol..ctor()
...
我一直試圖弄清楚這是什麼意思,但我必須承認,我有點迷失在這裏。該方案有一個.exe.config
文件具有以下內容:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
...
</configSections>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<microsoft.web.services3>
<security>
<x509 allowTestRoot="false" storeLocation="CurrentUser" skiMode="RFC3280"/>
</security>
</microsoft.web.services3>
...
</configuration>
刪除從XML中<security>
節點上方排序修復該問題(在WSE032錯誤消失),但是這不是我的情況的解決方案,如我需要以這種方式配置安全性,以便能夠簽署稍後傳輸的數據。
任何想法可能是什麼問題。顯然,WSE 3.0已經安裝在客戶機器上,否則,在發生WSE032錯誤之前,堆棧跟蹤不會在調用者中顯示它。