サードパーティのSOAPサービスに接続する必要があり、WCFを使用しています。このサービスはApache AXISを使用して開発されたもので、私たちはそれを制御することはできず、その動作方法を変更するための影響はありません。 私たちが見ている問題は、Webサービスセキュリティを使用して要求をフォーマットすることを期待しているため、すべて正しい署名などを行っていることです。しかし、第三者からの応答は保証されません。ワイヤを盗聴すると、応答はうまく戻ってきます(ただし、タイムスタンプや署名などはありません)。 基本的な.NETコンポーネントは、これをセキュリティ上の問題として認識しているため、これをエラーとして投げるので、実際にはSOAPレスポンスを受け取っていません。セキュリティで保護された要求を送信するためにWCFフレームワークを構成する方法はありますか?ただし、応答のセキュリティフィールドは期待しないでください。 OASIS仕様を見ると、応答が安全でなければならないことを強制するようには見えません。詳細について要求にセキュリティを使用するようにWCFに指示する方法はありますが、応答では無視しますか?
が、ここで私たちが見るの例外があります:
我々が受け取る例外は次のとおりです。
ちなみにSystem.ServiceModel.Security.MessageSecurityException was caught
Message="Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessageCore(Message& message, TimeSpan timeout)
at System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout)
at System.ServiceModel.Security.SecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates)
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
、私はその後、あなたはアウトタイムスタンプを残せば旨の記事をたくさん見てきましたセキュリティフィールドは期待できません。これはオプションではありません - 通信するサービスはタイムスタンプを要求します。
はまた、このパッチは、.NET 3.0用の修正プログラムもあり、.NET 3.5 SP1 –
の一部ですが、唯一の要求であることに注意してください。また、3.5 SP1用の修正プログラムは、Windows 7 SP1(およびServer 2008用)にもロールアップされています。 – nickvane