Hello,

I need some advice on how to implement a solution. I have a webservice
that gets request from both a Windows UI and a WebUI. I have setup my
business logic in such a way that a request from the Windows UI gets
run by a Windows UI specific business logic class and the Web UI
requests get handled by a Web UI specific business logic class (there
is inheritance going on, but it's not relevant to this question).

Right now I am passing in a string as a parameter to the method calls
in my web service that says "WIN" or "WEB" depending on where it came
from (this is a proof of concept project).

I would like to somehow add a parameter to the webservice context (or
SOAP Header, or some mechanism) so that I could do something like the
following:

Dim serviceProxy As New localhost.FooServiceWse
serviceProxy.RequestSoapContext.Add("UIType", "WIN")
serviceProxy.Bar(someparam)

Then in the WebService I would like to read out the UIType param from
the header. That way I would not have to pass the param to each web
method. I would rather include them in some collection.

I know this sample code is wrong (at least I can't seem to find the
value in the web service), but how should I go about doing this? Or am
I stuck passing the argument to every method in the web service class?

Thanks in advance!

-Jeff