1

I need to POST to a hrl https://xxxxx.com which expects a username and password BAsic authentication

We are using biztalk ESB dynamic send port

How do I configure this using binding configuration or behaviours or can I set this from UDDI

Adam Rackis
  • 79,454
  • 49
  • 255
  • 377
Arun
  • 41
  • 6

1 Answers1

0

For WCF adapter you can set any WCF adapter properties in ESB Endpoint Configuration. In your case it should be something like this:

SecurityMode=TransportCredentialOnly&TransportClientCredentialType=Basic&UserName=Youruser&Password=Yourpassword

It's not good to store them in clear text though. You can use SSO instead: just use UseSSO and AffiliateApplicationName.

Your problem can be solved using custom endpoint behavior too. You should register it in machine.config to use from ESB. In behaviour you should have something like this:

        public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
    {
        ClientCredentials clientCredentials = new ClientCredentials();
        clientCredentials.UserName.UserName = "user";
        clientCredentials.UserName.Password = "password";

        bindingParameters.Add(clientCredentials);
    }
Dmitry Golubets
  • 570
  • 5
  • 12
  • The following is my binding config where do i add username and password BindingConfiguration=&BindingType=webHttpBinding&EndpointBehaviorConfiguration= I dont want to add in the custom endpoint behaviour this is reused for all REST calls. – Arun Dec 05 '11 at 13:40