3

I am trying to return a custom fault exception using unity but I get the following error during Rst\Issue action:

[Service Trace Viewer exceptions][1]

Image: [1]: https://i.stack.imgur.com/oAxGT.png

  1. No signature message parts were specified for messages with the 'http://tempuri.org/IWcfServiceLayer/GetFirstOrder' action.
  2. The security protocol cannot secure the outgoing message
  3. RequestContext aborted

I am using a custmBinding which actually resembles wsHttpBinding. Here I manually throw an exception in the wcf method, in order to test the behaviour.

When I comment out the throw new exception statement, the service works fine and returns the expected results. But the service cannot handle exceptions currently. So why can't the service secure the outgoing message when an exception occurs?

EDIT (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>
Legends
  • 21,202
  • 16
  • 97
  • 123

0 Answers0