tags:

views:

138

answers:

2

I'm attempting, with great difficulty, to have an WCF client communicate with a WSE 2.0. The wse service requires UserName token for authentication and it would appear that this is not possible over an unsecured channel.

I have configured the following custom bindings:

<customBinding>
        <binding name="wse2Binding">
          <textMessageEncoding messageVersion="Soap11WSAddressingAugust2004" />
          <security authenticationMode="UserNameOverTransport">
            <secureConversationBootstrap authenticationMode="UserNameOverTransport" />
          </security>
          <httpTransport authenticationScheme="Digest"/>
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint address="http://ecareweb/eCareMessaging1_1/Notification.asmx"
        binding="customBinding" bindingConfiguration="wse2Binding"
        contract="NotificationSrv.NotificationSoap" name="NotificationSoap1" />
    </client>

Do you know of a work-around for this problem

Thanks in advance

+1  A: 

WCF will not let you send username/password over an HTTP connection. If you have control over the service side I would suggest adding an HTTPS endpoint so you can use transport level security.

Maurice
I'm aware of this solution, but wondered if there was a work around for having to impose https.
Skwrul
+1  A: 

WCF does not allow you by default, but if you have exceptional circumstances you can still do it. Here is some sample code for using ClearUserNameBinding

Emil