Custom WCF Extensions

Jan 14, 2016 at 3:54 PM
Edited Jan 14, 2016 at 4:03 PM
Good morning all,

I've got the need for custom WCF extension (to handle Salesforce OAUTH tokens in the REST communication...) and am wondering what you guys feel is the best way to handle the registration of the custom WCF behavior.

The way I see things, I've got 2 options for getting the behavior into WCF:
1) Add to both machine.config files in the .NET framework. (32 and 64 bit files.)
2) Use the "Import WCF Configuration" tool within the BizTalk admin interface for the WCF-WebHTTP Send Adapter.

I'm somewhat leaning toward #2 because of the simple nature of things. But, I'm not too opposed to either.

In any event, both options lead me to my question of this group: How can I automate this with BTDF?
For option #1, I found this solution from Paul Baars:

Is there a way to get option #2 to work within BTDF? Also, do you guys think this should be a manual thing instead of built into the BTDF deployable MSI? I really like keeping everything within one deployment step to minimize production deployment complexity... and possible deployment problems.

Thanks so much for your responses on this! ​​

Chris J Albertson
President - Chris Albertson and Associates, LLC
Jan 15, 2016 at 3:29 AM
Hi Chris,

I haven't touched custom WCF bindings in BizTalk for a long time. I believe you can accomplish #2 (my recommendation) by manually configuring the port in BizTalk Admin using Import WCF Configuration and manual clicking and typing in the GUI. If you then export the bindings -- unless I'm mistaken -- all the custom binding stuff comes along with the export, which can become PortBindingsMaster.xml. Perhaps you've already tried that approach.

I think it should all be part of the automated BizTalk app deployment.

Jan 22, 2016 at 10:25 AM
Hi Chris.

All my WCF SendPorts are custom because we use a logging extension. I use option #2 all the time. It works fine. Only when first time installation you'll need to update the WCF-Custom adapter. You could propbably write some PS script to automate.

Jan 22, 2016 at 1:09 PM
Thanks to you both for the replies on this. Bo, that's what I'm going to do. Since it's a BizTalk configuration and not an "application" configuration, it will last between undeploy/deploy processes. (Just a one-time thing as you said) I'm just putting the dll that defines the behavior in a centralized/shared application deployed via BTDF. All should be good.

Thanks again and have a great weekend!

Chris J Albertson