1

I have developed a small tool to upload salary information to the swiss administration and I used WSE 3.0 with success. But now, one of my customers has reported that on his machine, my program crashes with the following stack trace:

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()
  ...

I've tried to figure out what this means, but I must admit that I am a bit lost here. The program has a .exe.config file with the following contents:

<?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>

Removing the <security> node from the XML above sort of fixes the issue (the WSE032 error vanishes) but this is not a solution in my case, as I need to configure the security this way in order to be able to sign the data I am transmitting later on.

Any idea what could be the issue. Obviously, WSE 3.0 has been installed on the customer's machine, since otherwise, the stack trace would not have shown it in the callers before WSE032 error happens.

4

1 回答 1

3

客户似乎是从安装在共享上的驱动器号执行程序;尽管我认为 .NET 3.5 SP1 允许从 .NET 启动的 EXE 具有完全信任权限LocalIntranet_Zone,但这似乎是加载可执行文件的 WSE 配置部分的问题。

为了解决这个问题,我跑了caspol,可以在这里找到:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\caspol.exe

命令行类似于以下内容:

caspol -m -ag LocalIntranet_Zone -url N:\* FullTrust -n "name" -d "description"

对于安装在驱动器号上的共享N:;请注意,name并且description纯粹是信息性的。

该命令赋予驱动器上的所有可执行文件N:特权FullTrust,就好像它们是从本地资源(例如硬盘驱动器)启动一样。

请参阅如何:授予MSDN 上的文件夹和程序集的权限。

于 2010-01-15T12:41:03.713 回答