WCF Interop with WSE2.0

喜欢而已 提交于 2019-12-11 16:46:34

问题


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:


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




回答2:


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.



来源:https://stackoverflow.com/questions/1425973/wcf-interop-with-wse2-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!