Previous Next

Thread: Handling everything with the .ASPX Engine

Last post 09-19-2008 1:58 PM by anilr. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 09-19-2008, 4:23 AM

    • c0r0n3r
    • Not Ranked
    • Joined on 09-19-2008, 8:18 AM
    • Posts 1

    Handling everything with the .ASPX Engine

    Hello everybody,
    I was not able to find a simple workaround for this, so I tought I'll ask :).

    In the older IIS Versions I was able to add an ISAPI Extension (.NET Framework) for all filetypes, meaning that all files were processed with (e.g.) the Application_BeginRequest sub in global.asax.

    I was able to get this function setting following:
    runAllManagedModulesForAllRequests="true"

    But as I worked on it seems that some files still are not processed the same.

    Sample Project:
    I need to verify a session varaible on certain image and pdf files - but as soon as I try to use Application_BeginRequest on a session variable with an image I get 'session state not available in this context'

     Is there a simple workaround for this problem?

    Best Regards

     

     

  • 09-19-2008, 1:58 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 1,225

    Re: Handling everything with the .ASPX Engine

    To get session-state, the handler for the request must be a managed handler that implements IRequiresSessionState or IReadOnlySessionState - the handler for static files is a native handler.  You would have needed your own custom handler implementing either of those interfaces to use session-state for static files in IIS6 also.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (2 items)
Page view counter