Alter session state when EnableSessionState is ReadOnly
问题 I have a (legacy) ASP .NET WebForms project, and I want to set EnableSessionState to ReadOnly wherever possible to prevent the session lock from blocking concurrent page loads by a single user. On some pages, I actually do want to write to the session state. Normally, you would just set EnableSessionState back to True for only those pages where you need to write to the session. The problem is that the Page_Load event only needs to read from the session state, and the only code on the page