Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>BuzzAnn,</p> <p>Microsoft's documentation on the topic indicates that setting your page-level session state mode to "ReadOnly" should safeguard you against concurrent attempts to <em>write</em> session state information (they'll queue and be handled serially), but multiple readers will be allowed. See the "Synchronizing Access to the Session State" section:</p> <p><a href="http://msdn.microsoft.com/en-us/library/aa479041.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa479041.aspx</a></p> <p>When the <strong>EnableSessionState</strong> property for a page is set to "ReadOnly," each page request attempts to get a reader lock on the state information. In standard ReaderWriterLock semantics, any number of readers can have concurrent access to the information being protected. Any request that achieves a writer lock (e.g., through <strong>EnableSessionState</strong> being set to "true"), though, will block writes <em>and</em> reads on the session state information until the request holding the writer lock completes.</p> <p>As long as all you're trying to do is read session state information from your pages while they have <strong>EnableSessionState</strong> set to "ReadOnly," all read requests will proceed without blocking. If you attempt to write, though, the documentation isn't clear about what will actually happen. Assuming a ReaderWriterLock is all that's being used to synchronize access, my guess is that you won't be protected against overwrites, race conditions, and other non-synchronized access problems.</p> <p>If you're going to attempt to write to session state, be sure to set <strong>EnableSessionState</strong> to "true" to ensure that a writer lock is achieved and synchronization occurs as is needed.</p> <p>I hope this helps!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload