alle Technical posts

Impersonate WCF Credentials when calling a WCF Service

One of the requirements that I regularly encounter is that I need to call WCF TCP or WCF Web with trusted authentication.
My development laptop or my virtual machines are never member of the customer domain so that makes it almost impossible to develop and test against services of the customer. For Example, Microsoft Dynamics is often used with WCF-TCP which only allows for trusted authentication.

I did some searching on the internet and there doesn’t seem to be a good solution for it. Or at least I was not able to find it. That is why I created a Behavior to do just that. I also added an option “Enabled” to the behavior, if that is set to “False” the behavior will not impersonate.

I did this to make the behavior “Deployment Framework Friendly”. I used the deployment framework and have impersonation working on my local machine. On the servers in the DTAP environment the credentials of the “BizTalk Service Account” were used and Impersonation was set to “False”. By introducing this variable you can use the same binding file for every environment and configure the actual impersonation in the “EnvironmentSettings” spreadsheet which is part of the BTDF.

But this post is about a “problem” and should include a solution as well. So here is the complete working code of this behavior.

 

Abonneer je op onze RSS feed

Hallo,
hoe kunnen we je helpen?

Een project in gedachten?

Neem contact op

Let's talk

Let's talk

Bedankt, we nemen snel contact op met je!

Bel ons

Bedankt, we sturen het verhaal naar jouw inbox

Ongeldig email-adres

Verstuur

Je download zal binnen enkele seconden starten!

Houd contact met ons - schrijf je in voor onze nieuwsbrief

Blijf op de hoogte van trends, events en de laatste verhalen van klanten

Ongeldig email-adres

Verstuur

Mooi, je bent ingeschreven!