外部で定義された WSDL の Web サービスを開発しています。アクセスは HTTP/S (サーバーおよびクライアント証明書) で行われ、要求と応答の両方がそれぞれの証明書で署名されます。サービス参照を使用して VS2010 に WSDL をインポートし、MessageContracts に署名を追加し、構成ファイルを設定してセキュリティと https を実行し、ポートに SSL を設定しました。私はそれを機能させることに近づいていますが、手動アドレス指定を有効にwsa:To
して応答に要素を挿入する必要がありますが、それを機能させる方法がわかりません..どんな助けも大歓迎です.
これが私の現在の設定セクションです:
<bindings>
<customBinding>
<binding name="AfleverServiceSoapBinding_V1_1">
<security defaultAlgorithmSuite="TripleDesRsa15"
authenticationMode="MutualCertificateDuplex"
requireDerivedKeys="false"
securityHeaderLayout="Lax"
includeTimestamp="true"
keyEntropyMode="CombinedEntropy"
messageProtectionOrder="EncryptBeforeSign"
messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireSignatureConfirmation="false"
allowSerializedSigningTokenOnReply="true"
enableUnsecuredResponse="False">
<localClientSettings cacheCookies="true"
detectReplays="true"
replayCacheSize="900000"
maxClockSkew="00:05:00"
maxCookieCachingTime="10:00:00"
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>
<mtomMessageEncoding maxReadPoolSize="64"
maxWritePoolSize="16"
messageVersion="Soap11WSAddressing10"
maxBufferSize="65536"
writeEncoding="utf-8">
<readerQuotas maxDepth="32"
maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
</mtomMessageEncoding>
<httpsTransport manualAddressing="false"
maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
allowCookies="false"
authenticationScheme="Anonymous"
bypassProxyOnLocal="false"
decompressionEnabled="true"
hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true"
maxBufferSize="65536"
proxyAuthenticationScheme="Anonymous"
realm=""
transferMode="Buffered"
unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true"
requireClientCertificate="true" />
</binding>
</customBinding>
</bindings>
これのほとんどは自動生成されました。
manualAddressing
属性を trueに設定する必要があることはわかっていhttpsTransport
ますが、この設定はメッセージ レベルのセキュリティであるため、例外が発生します。残りを同じに保ちながら、トランスポートレベルのセキュリティに切り替える方法を知っている人はいますか? これは であるため、要素customBinding
のmode
属性security
は使用できません。
どうも、ゲイト。
ところで、コードを設定する方法は知ってwsa:To
いますが、手動アドレス指定に移行できない限り、エンコード応答で失われます..