我已经开发了一个小工具来上传工资信息给瑞士政府,并且我使用了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错误之前,堆栈跟踪不会在调用者中显示它。