Writing WCF interceptor for WCF WS-Security and WSE Nonce Authentication RRS feed

  • Question

  • I Have to write a WCF Interceptor which will extend the WCF Behaviour 

    The behavior of my extension is that it will add a custom header to the request....

    custom Header is going to be like below

      <wsse:Security soapenv:mustUnderstand="1"
        <wsse:UsernameToken wsu:Id="UsernameToken-8"
          <wsse:Password Type=""                  >TeStPaSsWoRd1</wsse:Password>
          <wsse:Nonce EncodingType=""                  >f8nUe3YupTU5ISdCy3X9Gg==</wsse:Nonce>

    I have written a CustomCredential which will add the header to the request.

    my problem is how to wirte extension of this WCF Behavior 

    as it is using CustomCredentials 

    I want something like below 

    client.ChannelFactory.Endpoint.Behaviors.Add(new CustomCredentials());

    in my WCF Interceptor

    • Edited by BizDev1988 Friday, February 22, 2013 8:07 PM
    Friday, February 22, 2013 7:58 PM