Controller SessionStateBehavior is ReadOnly and I can update Session Variable

see Writing to a read only session in MVC 3+ That post claims the behavior is inconsistent. I am definitely able to write to Session in Controllers using ReadOnly. I Would treat it like this: Required means you are requesting a exclusive lock on Session (i.e. no parallel processing of requests for the same sessionID) … Read more

Where are the session variables saved?

Variables put into Session are stored wherever the configured SessionStateProvider is configured to store them. The default SessionStateProvideruses what’s referred to as In Process (InProc) Session and the storage location for this is in server memory, inside the memory space of the ASP.NET worker process. You can configure your own SessionStateProvider to store Session variables … Read more

PHP session side-effect warning with global variables as a source of data

basically you have a variable with the same name as your session. ex: $_SESSION[‘var1’] = null; $var1 = ‘something’; which will reproduce this error. you can stop PHP from trying to find existing variables and warning you about them by adding these lines to your script: ini_set(‘session.bug_compat_warn’, 0); ini_set(‘session.bug_compat_42’, 0); these values can be set … Read more

Session variable value is getting null in ASP.NET Core

For ASP.NET Core 2.1 and 2.2 In the ConfigureServices method of the Startup class, Set options.CheckConsentNeeded = context => false; as follows: services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => false; options.MinimumSameSitePolicy = SameSiteMode.None; }); Problem solved!