Hi.
We are developing a IHttpModule that requires session state to be available when the pipeline reaches the Process Request stage.
We use the following :-
application.PostMapRequestHandler += newEventHandler(SetSessionStateBehavior);
and in this method we apply the following:-
application.Context.SetSessionStateBehavior(SessionStateBehavior.Required);
Which works as expected.
However, if the request is for a static file, i.e website/image.gif then we assume the static file handler takes over our process request is never reached, so we have replaced the handler for our own dummy handler that implements the interfaceIRequiresSessionState, as follows:-
application.Context.RemapHandler(newPlaceHolderHandler());
this works but session state is not available for requests that reference a static files.
Can anyone help resolve this issue. We need a way of forcing session state to be available, regardless of the request URL.
Regards
Adrian.