WSE 3.0和AllowTestRoot [英] WSE 3.0 and AllowTestRoot

查看:80
本文介绍了WSE 3.0和AllowTestRoot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我正在编写.NET 2.0应用程序而我正在使用WSE 3.0与SOAP Web服务(我的Web服务的类)进行通信客户端继承是WebServicesClientProtocol)。我使用的是测试证书(x509)并收到以下错误:

I'm writing a .NET 2.0 application and I'm using WSE 3.0 to communicate with a SOAP web service (the class that my web service client inherits is WebServicesClientProtocol). I am using a test certificate (x509) and get the following error:

WSE3003:无法验证证书的信任链。 请检查证书是否已在"受信任的人员证书"商店中正确安装。 或者,如果这是测试证书,您可能希望将allowTestRoot配置部分设置为true。

WSE3003: The certificate's trust chain could not be verified.  Please check if the certificate has been properly installed in the Trusted People Certificate store.  Or you might want to set allowTestRoot configuration section to true if this is a test certificate.

我的证书位于"受信任的人"存储中,如此错误消息建议。但是,我无法找到如何启用AllowTestRoot属性。当我搜索互联网时,所有页面似乎都将其添加到"Web.config"中。文件。我根本没有该文件,因为我的程序是一个Windows窗体应用程序,而不是这样的Web服务,只使用Web服务。我尝试添加它,我也尝试将这些东西包含在我的应用程序的配置文件中。没用。

My certificate is in the Trusted People store like this error message recommends. However I can't find out how to enable the AllowTestRoot property. When I search the Internet, all pages seem to have it added in a "Web.config" file. I don't have that file at all, because my program is a windows forms application and not a web service as such, only using a web service. I tried to add it though, and I also tried to include this stuff in my application's config file. Didn't work.

< configuration>
    < configSections>
    &NBSP;&NBSP;&NBSP; < section name =" microsoft.web.services3" type =" Microsoft.Web.Services3.Configuration.WebServicesConfiguration,Microsoft.Web.Services3" />
    < / configSections>
   
    < microsoft.web.services3>
    &NBSP;&NBSP;&NBSP; < security>
    &NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP; < x509 storeLocation =" LocalMachine" verificationMode = QUOT; TrustedPeopleOrChain" allowTestRoot = QUOT;真" verifyTrust = QUOT;真" />
    &NBSP;&NBSP;&NBSP; < / security>
    < /microsoft.web.services3>
< / configuration>

<configuration>
    <configSections>
        <section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3" />
    </configSections>
   
    <microsoft.web.services3>
        <security>
            <x509 storeLocation="LocalMachine" verificationMode="TrustedPeopleOrChain" allowTestRoot="true" verifyTrust="true" />
        </security>
    </microsoft.web.services3>
</configuration>

理想情况下,我希望以编程方式设置AllowTestRoot,而不是触摸配置文件。那可能吗?我找到了以下属性,但它是只读的,因此以下行不起作用。

Ideally I would want to set the AllowTestRoot programmatically, and not touch the config file at all. Is that possible? I found the following attribute, but it is read only, so the following line doesn't work.

Microsoft.Web.Services3.Configuration.WebServicesConfiguration.SecurityConfiguration.AllowTestRoot = true;

Microsoft.Web.Services3.Configuration.WebServicesConfiguration.SecurityConfiguration.AllowTestRoot = true;

任何帮助将不胜感激。谢谢。

Any help would be greatly appreciated. Thanks.

推荐答案

我也使用app.config进行桌面设置,没有设置wse3的问题。是否忽略了所有WSE3设置或仅此设置? WSE3 SDK包含一些带app.config的客户端应用程序,请将它们检出。
I also use app.config for desktop and have no problems with setting wse3. Are all WSE3 settings ignored or just this one? The WSE3 SDK contains some client applications with app.config, check them out.


这篇关于WSE 3.0和AllowTestRoot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆