WCF – Issue a request over https with custom header

In my current project I need to call a web service over https. Security is implemented by using a custom header (old school). To support this in WCF follow the following simple steps:

In the configuration file (app.config) make the following changes:

    <endpoint address=”https://…
        binding="basicHttpBinding" bindingConfiguration="MyHttpsBinding"
        contract="…" name="ACC">
        <headers>     <!—your custom header here  –>
            <credentials >

Add a new binding:

<binding name="MyHttpsBinding">
    <security mode="Transport">
            <extendedProtectionPolicy policyEnforcement="Never" />

About Gaston

This entry was posted in Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s