This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 3012 - SessionStateBehaviour in HttpContext is ignored
Summary: SessionStateBehaviour in HttpContext is ignored
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-23 06:58 UTC by Dan Parnham
Modified: 2013-03-11 00:26 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Dan Parnham 2012-01-23 06:58:22 UTC
We have been attempting to find our way around the bug http://bugzilla.xamarin.com/show_bug.cgi?id=381 which we have been struggling with for the best part of a year now. 

In the next iteration of our application we will need sessions enabled, but they are only required for specific controllers, so if we can disable it for the ones that handle the heavy polling it should avoid the memory leak.

Since we are using the MVC3 and it now supports session-less controllers (easily configured through the SessionState attribute), we thought this would be an ideal way to implement session disabling where required.

However, when I set the attribute in our test application it appears to have no effect whatsoever, in fact I can still write things to the session (this should be throwing an exception according to the examples on the MVC3 website).

Having dived into the MVC code and then followed the chain into the mono sources I found that the .NET 4 function SetSessionStateBehavior has been implemented in HttpContext.cs and yet it appears that absolutely nothing is done with the stored value. This means that, although an MVC3 application builds and runs, the setting of the session state behaviour silently does nothing.
Comment 1 plusapps 2013-03-11 00:26:38 UTC
We are also facing the same issue. HttpContext.SetSessionBehavior() call don't have any effect.

Note You need to log in before you can comment on or make changes to this bug.