Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP.NET应用程序中WSE 3.0值的配置_C#_Asp.net_Web Services_Configuration_Wse3.0 - Fatal编程技术网

C# ASP.NET应用程序中WSE 3.0值的配置

C# ASP.NET应用程序中WSE 3.0值的配置,c#,asp.net,web-services,configuration,wse3.0,C#,Asp.net,Web Services,Configuration,Wse3.0,我的ASP.NET web应用程序通过引用程序集Microsoft.web.Services3.dll v2.0.50727使用WSE 3.0协议 namespace Microsoft.Web.Services3 { public class WebServicesClientProtocol : SoapHttpClientProtocol { public WebServicesClientProtocol(); ............

我的ASP.NET web应用程序通过引用程序集Microsoft.web.Services3.dll v2.0.50727使用WSE 3.0协议

namespace Microsoft.Web.Services3
{
    public class WebServicesClientProtocol : SoapHttpClientProtocol
    {
        public WebServicesClientProtocol();

        ............
        public void SetPolicy(Policy policy);
        public void SetPolicy(string policyName);
        ............
    }
}
我的问题是针对
SetPolicy(stringpolicyname)
当前,该字符串是从该策略的配置文件specfic获取的

<policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">
  <extensions>
    <extension name="CertificateOverTransportSecurityAssertion" type="ABCD.ApplicationBlocks.WSSecurity.CertificateOverTransportSecurityAssertion, AAAA.ApplicationBlocks.WSSecurity" />
  </extensions>
  <policy name="ClientPolicy">
    <CertificateOverTransportSecurityAssertion clientCertificateSubjectDistinguishedName="E=xxxxx, CN=yyyyy, OU=zzzz, O=ssss, L=hhhhh, S=ee, C=ii"/>
  </policy>
</policies>

我该怎么做

什么是特殊和特殊?:)只是想检查一下:您是否知道WSE已经过时,并已被WCF取代?@JohnSaunders是的。但是,当前的目标是避免使用WSE配置文件,而不是迁移到WCF。难道您不能只执行服务WSE.SetPolicy(新策略(新CertificateOverTransportSecurityAssertion())(由于CertificateOverTransportSecurityAssertion特定于您的应用程序,因此您必须知道如何为其设置ClientCertificateSubjectDifferentizedName)
//current -- where "ClientPolicy" is gotten from config. file. 
theServiceWse.SetPolicy("ClientPolicy");

//proposed usage of
    public void SetPolicy(Policy policy);