views:

283

answers:

1

I am trying to use this upload control as recommended by someone on here:

http://darrenjohnstone.net/2008/07/15/aspnet-file-upload-module-version-2-beta-1/

So I'm trying to implement a custom processor in order to store the uploaded files in the session. However, when the file is passed to the processor (from the HttpModule) the SEssion is null.

Googling shows that I should add "IREquiresSessionState" or something to the Module, however I don't have access to the module as it is in a dll - so I need an alternative. Can anyoen think of one?

Thanks

A: 

I have discovered this method of the Global.asax:

protected void Application_PostRequestHandlerExecute(Object sender, EventArgs e)

This still knows about SessionState, but after the request has finished. So the processing after the HttpModule can happen in there (the items are just stored in Context.Items instead of straight into the session).

Slighty dirty? Yes, but solves the problem

Paul