I\'ve come across a curious behaviour of ASP sessions. You can force a controller to be outside of the user\'s session - I want to be able to do this so that multiple reques
~/Sample/SetTest?value=foo
Yes it won't throw any error, but it also didn't persist the session at the end of the request. By design any thing that you write to session gets updated (only if the session is writable) at the very end of the request life-cycle.
In my test ~/Sample/Test returns nothing.
I think they should have failed fast here when the session is readonly.
By the way your sample need to be rewritten
string test = (string)this.Session["test"];