I need to make the session readonly so I can establish multiple requests to a page that uses sessions variables but in the readonly mode.
Since all the process are p
If you use ASP.NET MVC, you can use the SessionStateAttribute
class on the controller level.
[SessionState(SessionStateBehavior.ReadOnly)]
If you want to control the behavior on an action level, you can use this:
https://www.c-sharpcorner.com/UploadFile/ff2f08/session-state-behavior-per-action-in-Asp-Net-mvc/
If you use ASP.NET Web Forms, I am not quite sure, but it should be something along these lines...
In your scenario there must be one page who can write on session and other have no right to write on it. page that has session-state write access will hold a writer lock on the session until the request finishes. A page gains write access to the session state by setting the EnableSessionState attribute on the @Page directive to True. A page that has session-state read access for example, when the EnableSessionState attribute is set to ReadOnly, will hold a reader lock on the session until the request finishes.
<% @Page EnableSessionState="ReadOnly" %>
for more information you can read this link.