Robert van Drunen - 303 - Mar 5, 2014

Just a short question:

We have a couple of IServiceStackHandler implementations and I am wondering what the difference is between the ProcessRequest and ProcessRequestAsync methods. We are running from a console application so I can imagine that it has something to do with ASP.NET support? In our situation I have never had a direct call to ProcessRequest but I need to implement it as an empty method anyway.

Thanks!

In v4 it was changed to be able to execute handlers both sync and async where we now our handlers implement IHttpAsyncHandler.

If your handler implementation is sync, then can get by only implementing the sync ProcessRequest() by inheriting from the convenient HttpAsyncTaskHandler base class, e.g:
https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack/Host/Handlers/CustomResponseHandler.cs

Robert van Drunen:

Thanks for the quick reply (I totally forgot to respond)