Modify Address of asmx Method Call
Posted
by
Adam
on Stack Overflow
See other posts from Stack Overflow
or by Adam
Published on 2011-01-08T06:28:34Z
Indexed on
2011/01/08
7:53 UTC
Read the original article
Hit count: 242
Silverlight
|asmx
When I'm making asmx web service calls from Silverlight, is there any way to have the (generated) SoapClient objects modify the address that they call the service on?
Specifically, I'd like to tack on a QueryString value onto each call that the service makes. So if I have
DataService.SilverlightServiceSoapClient C = new DataService.SilverlightServiceSoapClient();
Is there any way to do something like:
C.Address += "?Foo=Bar";
Which would allow me to, from my WebMethod, say:
HttpContext.Current.Request.QueryString["foo"];
Obviously I can modify my WebMethods to take this value in as a parameter, but I'd like to avoid doing that if possible.
© Stack Overflow or respective owner