3

Unity を使用してカスタム フォールト例外を返そうとしていますが、Rst\Issue アクション中に次のエラーが発生します。

[サービス トレース ビューアーの例外][1]

画像: [1]: http://i.stack.imgur.com/oAxGT.png

  1. ' http://tempuri.org/IWcfServiceLayer/GetFirstOrder ' アクションを含むメッセージに対して署名メッセージ パーツが指定されていませんでした。
  2. セキュリティ プロトコルは発信メッセージを保護できません
  3. RequestContext が中止されました

実際にwsHttpBindingに似たcustmBindingを使用しています。ここでは、動作をテストするために、wcf メソッドで手動で例外をスローします。

throw new exception ステートメントをコメント アウトすると、サービスは正常に動作し、期待される結果を返します。ただし、サービスは現在例外を処理できません。 では、例外が発生したときに、サービスが発信メッセージを保護できないのはなぜでしょうか?

編集 (BindingConfig):

  <customBinding>
    <binding name="MyServiceBinding" closeTimeout="00:05:00" openTimeout="00:05:00"
      receiveTimeout="00:05:00" sendTimeout="00:05:00">
      <transactionFlow />
      <reliableSession maxPendingChannels="4000" maxRetryCount="20"
        maxTransferWindowSize="4000" ordered="false" />
      <security enableUnsecuredResponse="false" authenticationMode="SecureConversation"
        messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
        <secureConversationBootstrap authenticationMode="SspiNegotiated"
          messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" />
        <localServiceSettings maxStatefulNegotiations="500" maxPendingSessions="500" />
      </security>
      <textMessageEncoding maxReadPoolSize="100" maxWritePoolSize="50" />
      <httpTransport maxReceivedMessageSize="2000000" allowCookies="true"
        maxBufferSize="2000000" />
    </binding>
  </customBinding>
4

0 に答える 0