views:

26

answers:

0

I was rewriting my routing handlers, and now I found a need to access session in the handler, which I previously thought, was not possible. However a quick search turned up with this question, answer for which is accepted, so I'm assuming it did work. Session is still null when I try to do the same thing.

Am I missing something or is there a difference between how session is handled in routing modules in asp.net and mvc?

EDIT: I tried the above in both VS2008 and 2010, both MVC and standard asp.net projects, but no combination resulted in non-null session. Pretty sure it's just not possible to retrieve session in a handler!

Going to have to use base pages instead. Feels a bit of a shame splitting up routing and authentication logic though.