wwCallbackHandler is an Http Handler base class that allows you to create a class with methods marked up with a [CallbackMethod] attribute which are then exposed for remote execution. The handler routes the to the methods and executes the call and returns the results - or any errors - as JSON strings.
To use this service you need to create an HttpHandler (either .ASHX or a class registered in web.config's httpHandler section) and then add methods with the [CallbackMethod] attribute and that's it. The service accepts inputs via query string and POST data.
The service automatically supports callbacks by the wwMethodCallback server and wwMethodCallback client controls which use a specific POST format. Plain REST calls can also be made with the following URL syntax:
POST data can then be passed in to act as parameters:
- Raw Post Buffer
You simply pass raw POST data that you can access with Request.Form in the handler
- JSON value or object string
Alternately you can set the content type to application/json and pass a JSON string of a value or object which calls the server method with a single parameter of matching type.
For more information on how to call these handlers see Using wwCallbackHandler with REST Calls.
public class wwCallbackHandler : object, IHttpHandler
public sealed void ProcessRequest( HttpContext context );
||Returns an error response to the client from a callback. Code should exit after this call.|
public void WriteErrorResponse( string ErrorMessage );
||This handler is not thread-safe|
See also:How wwCallbackHandler works
Using wwCallbackHandler with REST Calls