Your script should have one page that can write in the session, and the other does not have the right to write on it. a page with write access to a session will contain a record lock in the session until the request is completed. The page gains write access to the session state by setting the EnableSessionState attribute in the @Page directive to True. A page that has read access to session state, for example, when the EnableSessionState attribute is set to ReadOnly, will hold the read lock in the session until the request completes.
<% @Page EnableSessionState="ReadOnly" %>
for more information you can read this link .
source
share