如何关闭.NET客户端的验证响应?

时间:2015-07-09 14:34:32

标签: c# .net soap

我已经从WSDL语言环境文件构建了一个.NET客户端。现在我遇到了问题,因为服务器在JAVA中并且验证请求出现问题,所以我有这个错误:

Cannot resolve KeyInfo for decryption: KeyInfo 'SecurityKeyIdentifier
(
IsReadOnly = False,
Count = 1,
Clause[0] = X509IssuerSerialKeyIdentifierClause(Issuer = 'CN=testedoca, C=IT', Serial = '1342448880')
)', available tokens 

现在我想禁用验证响应,所以我想更改app.config但是我遇到了问题

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 

    <supportedRuntime version="v2.0.50727"/></startup>
    <system.serviceModel>

      <behaviors>
        <serviceBehaviors>
          <behavior name="my_service_behavior">
            <serviceCredentials >
                <serviceCertificate findValue="..." x509FindType="FindByThumbprint" storeName="CertificateAuthority" storeLocation="LocalMachine" />
            </serviceCredentials>
          </behavior>
        </serviceBehaviors>
      </behaviors>
        <bindings>
            <customBinding>
                <binding name="PianoAssistenzialeResidenzialePortBinding">
                    <security defaultAlgorithmSuite="Basic128" authenticationMode="MutualCertificate"
                        requireDerivedKeys="false" securityHeaderLayout="Lax" includeTimestamp="true"
                        messageProtectionOrder="SignBeforeEncrypt" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
                        requireSignatureConfirmation="false" >
                        <localClientSettings detectReplays="true" />
                        <localServiceSettings detectReplays="true" />
                    </security>
                    <textMessageEncoding messageVersion="Soap11WSAddressing10" />
                    <httpsTransport />
                </binding>
            </customBinding>
        </bindings>
        <client>
            <endpoint address="https://edottotest.sanita.regione.rsr.rupar.puglia.it/nsisr/PianoAssistenzialeResidenzialeService"
                binding="customBinding" bindingConfiguration="PianoAssistenzialeResidenzialePortBinding"
                contract="ServiceReference1.PianoAssistenzialeResidenziale"
                name="PianoAssistenzialeResidenzialePort" behaviorConfiguration="my_service_behavior" />
        </client>
    </system.serviceModel>
</configuration>

如何更改app.config以关闭验证响应?

0 个答案:

没有答案