Invoking web service methods from code-behind

Posted by Peter Wone on Stack Overflow See other posts from Stack Overflow or by Peter Wone
Published on 2010-05-06T01:21:33Z Indexed on 2010/05/06 1:28 UTC
Read the original article Hit count: 261

Filed under:
|

The application on which I am working has a web service exposing various methods. Most of these methods use WebOperationContext.Current to set headers up to prevent cacheing. This works fine when the service methods are consumed in AJAX via the generated proxy, but when I attempt to do the same thing from code-behind, WebOperationContext.Current is null.

Can anyone tell me how to confer appropriate call context on the method invocation?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about webservice