I can understand why no one gave an anwer!
This is pretty hard but I managed :)
In the HTTPModule You first register the begin and end method.
In the begin method the wcf begin method was called and the answer return to the endmethod of the httpmodule which called the endmethod of the wcf service.
When I found out that in the begin method of httpmodule no call to the wcf service had to be made but i had to call an endmethod of the httpmodule directly. If you do this directly IIS (the owner of the httpmodule) doesn't see the signalling anymore and your page waits for ever.
How to handle this:
call a selfmade IASyncResult method
private IAsyncResult NoNeedToCall(AsyncCallback callback, object state)
{
IAsyncResult result = new AsyncResult(callback, state);
callback.Invoke(result);
return result;
}
The Invoke(result) comes in my Endmethod of the HTTPModule. IIS has no vision anymore of the signaling proces. So we have to use a ManuelResetEvent object.
Instantiate it and call the Set() function of it like this:
ManualResetEvent evt = new ManualResetEvent(false);
evt.Set();
In my case I do the Set() after checking the AsyncState (a normal request will hold a AsyncState, but the 'shortroute' has it set to null. So I know I have to signal manually.
It costed me a lot of blood, sweet and tea(rs), but it works. Calling with invalid data or calling while te object is in cache is now past.