How i can add custom SOAP header to each request using WCF?

Nikolay Alexeev 21 Reputation points
2021-04-21T08:41:41.197+00:00

Good day!

I need to create application for connection to SOAP web service.
I have truble with authentificate on it, because Service don't supported Auth with using Creditials.
I should send Login request and get security token from service and then add this Token to every request in authenticate header.

Help me please, how i can do that?
I can not find any helpful information about it...

Developer technologies .NET Other
0 comments No comments
{count} votes

Accepted answer
  1. Theobald Du-MSFT 326 Reputation points
    2021-04-22T02:45:20.407+00:00

    Hi, @Nikolay Alexeev , To add a custom soap message header, you can use messageheader or messageinspector, For more information, you can refer to this link: How to add custom soap headers in wcf? Although it is a long time ago, it is still useful.

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Theobald Du


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.