2

I haven't been working with WCF for ages, now we are developing a Service and its methods receive all the same parameter. Is there a way, that I can pass this parameter throughout a ServiceContext so I don't need to repeat this parameter in every WCF method? My client is a WebApi application.

2 Answers 2

3

Why not use Headers, here are some links:

http://adilmughal.com/blog/2011/10/client-additional-parameters-using-custom-headers-in-wcf/

How to add a custom HTTP header to every WCF call?

Sign up to request clarification or add additional context in comments.

Comments

2

You can pass the additional parameters as OutgoingMessageHeaders in OperationContext which will be accessible in every method.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.