In the past I've used a soapheader in order to send in a userId to a webservice, but in WCF I cannot see how to do this.
Any ideas?
In the past I've used a soapheader in order to send in a userId to a webservice, but in WCF I cannot see how to do this.
Any ideas?
WCF is very extensible. You can do this easily by wrapping your service call in a custom context. This allows you to put any number of things in the context of the call, i.e. out-of-bounds.
Look at the Message headers as custom context example at iDesign for some clues: http://idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11#WCFEssentials
You can use the OperationContext / OperationContextScope to do it programatically
Or you can use the MessageContract / MessageHeader to do it declarativily.
Both are covered in this link:
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9c831ff4-f42f-4be3-9929-27643a1a4db8/