none
Call to WCF Service is using set WCF.UserName value from a previous call RRS feed

  • Question

  •  

    Hi All,

     

    I'm consuming a WCF service from within an orchestration. The Send port is configured to use a WCF-Custom transport type. The actual binding is a customised WSHttpBinding using a Security mode of "Message" and a clientCredentialType of "userName". The credentials for the transport properties have been set to not use Single Sign-On and the user name / password are left blank. The idea being the orchestration sets this from within a message assignment shape inside the Construct Message scope. The code looks along the lines of:

     

    wcfServiceActionInputMessage( WCF.UserName )  = originalBizTalkRequest.RequestHeader.Username ;

    wcfServiceActionInputMessage( WCF.Password ) =  "The password";

     

    The problem I get is the user name seems to get set once and reused for subsequent calls to the same service action from the same orchestration, but the original message is supplying the user name so it must get set as I have done within the expression for every call. I was able to confirm this by logging from the WCF end what user was sent over the wire.

     

    I'm a little new to BizTalk so let me know if I've missed any obvious detail that would help resolving this.

     

    Thanks in advance,

     

    Christian.

    Thursday, March 20, 2008 12:07 AM

Answers

  • Hi Christian,

    You're seeing this behavior because WCF send adapter caches the channel factories for performance reasons.

     

    Please try this

    wcfServiceActionInputMessage( BTS.IsDynamic ) = True;

     

    Thanks,

    Karahan

    Wednesday, March 26, 2008 6:23 PM

All replies

  • Hi Christian,

     

    Which Transport client credential type are you using? Will the problem still exist if you create another WCF port and set the UserName in the Security tab?

     

    If possible, could you please send your sample/minimized project for me to take a look? My email:

     

    wjzhang@online.microsoft.com (please remove online.)

     

    Thanks.

    Thursday, March 20, 2008 1:10 PM
    Moderator
  • Hi Christian,

    You're seeing this behavior because WCF send adapter caches the channel factories for performance reasons.

     

    Please try this

    wcfServiceActionInputMessage( BTS.IsDynamic ) = True;

     

    Thanks,

    Karahan

    Wednesday, March 26, 2008 6:23 PM
  • Hi Karahan,

     

    Sorry for the late response, I was on leave for a week.

     

    What worked was

     

    wcfServiceActionInputMessage( BTS.IsDynamicSend ) = true;

     

    Thanks again for the response

     

    Regards,

    Christian.

    Monday, March 31, 2008 12:57 AM