2

.net クライアントから JAX-WS Webservice を使用する際に問題が発生しました。WS への接続を開くことはできますが、いずれかの方法を使用しようとすると、次のエラーが発生します。

私が得た最初のエラーは次のとおりです。

Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was 'amms.someDomain.com' but the remote endpoint provided DNS claim '*.someDomain.com'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity '*.someDomain.com' as the Identity property of EndpointAddress when creating channel proxy.

私のapp.configは次のようです:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
        <customBinding>
            <binding name="SrvPortBinding">
                <security defaultAlgorithmSuite="Basic128" authenticationMode="UserNameForCertificate"
                    requireDerivedKeys="false" securityHeaderLayout="Strict" includeTimestamp="true"
                    keyEntropyMode="CombinedEntropy" messageProtectionOrder="SignBeforeEncrypt"
                    messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10"
                    requireSignatureConfirmation="false">
                    <localClientSettings cacheCookies="true" detectReplays="true"
                        replayCacheSize="900000" maxClockSkew="00:05:00" maxCookieCachingTime="Infinite"
                        replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
                        sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
                        timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
                    <localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00"
                        maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="00:05:00"
                        negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
                        sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
                        reconnectTransportOnFailure="true" maxPendingSessions="128"
                        maxCachedCookies="1000" timestampValidityDuration="00:05:00" />
                    <secureConversationBootstrap />
                </security>
                <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
                    messageVersion="Soap11WSAddressing10" writeEncoding="utf-8">
                    <readerQuotas maxDepth="32" maxStringContentLength="98192" maxArrayLength="916384"
                        maxBytesPerRead="94096" maxNameTableCharCount="916384" />
                </textMessageEncoding>
                <httpsTransport manualAddressing="false" maxBufferPoolSize="9524288"
                    maxReceivedMessageSize="965536" allowCookies="false" authenticationScheme="Anonymous"
                    bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
                    keepAliveEnabled="true" maxBufferSize="965536" proxyAuthenticationScheme="Anonymous"
                    realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
                    useDefaultWebProxy="true" requireClientCertificate="false" />
            </binding>
        </customBinding>
    </bindings>
    <client>
      <endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
          binding="customBinding" bindingConfiguration="SrvPortBinding"
          contract="InfoMedica1.Srv" name="SrvPort" >

      </endpoint>            
    </client>
</system.serviceModel>

`

それから私はこれを変更しました:

<client>
      <endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
          binding="customBinding" bindingConfiguration="SrvPortBinding"
          contract="InfoMedica1.Srv" name="SrvPort" >

      </endpoint>            
    </client>

に:

<client>
      <endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
          binding="customBinding" bindingConfiguration="SrvPortBinding"
          contract="InfoMedica1.Srv" name="SrvPort" >
        <identity>
          <dns value="*.someDomain.com"/>
        </identity>
      </endpoint>            
    </client>

そして今、私は例外を持っています: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. 内部例外:Invalid Security Header

誰かがその種のエラーを受け取り、それを機能させましたか? *この文字が にあるためにこのエラーが発生する可能性はあり*.someDomain.comますか?

サーバー側とクライアント側の時間を確認しましたが、同じです。この X509 とユーザー名/パスワード認証を追加する前に、Web サービスは正しく機能していました。

さらに情報が必要な場合は、コメントでお尋ねください:)

編集:

そのようなサービス証明書の検証を無効にしようとしたとき:

<client>
      <endpoint address="https://amms.someDomain.com:443/mmew1/Srv"
          binding="customBinding" bindingConfiguration="SrvPortBinding"
          contract="InfoMedica1.Srv" name="SrvPort" behaviorConfiguration="DisableServiceCertificateValidation">
        <identity>
          <dns value="*.someDomain.com"/>
        </identity>
      </endpoint>            
    </client>

例外が発生します:

There is no endpoint behavior named 'DisableServiceCertificateValidation'

前もってありがとう:)

4

1 に答える 1

0

Webサービスの問題でした。それを書いた男が何かを変更しましたが、正確にはわかりませんが、機能し始めました:)

多分誰かが同様の問題を抱えているので、ここにあります;)

興味のあるすべての助けをありがとう;)

于 2012-12-20T09:12:05.500 に答える