PageMethods and Session

I was looking high and low for this solution. Any ideas would be highly appreciated.

Situation: when several PageMethod calls are on the same page, each method call holds the lock of the Session object, blocking in this way. PageMethod calls can only be made asynchronous with a directive @Pagethat addressesFalse|ReadOnly

Conclusion: when the directive is Pageby default (read / write), but the session is not used anywhere on the page, calls are not blocked. Any reading or writing to a page-level session blocks pagemethod calls.

Problem: creating EnableSessionState=ReadOnlya directive is @Pagevery restrictive and does not want to accept this route.

Can a pagemethod call not be blocked? and still access the session? (maybe not write, but just read)

+3
source share
2 answers

The answer is described in detail in Sessions in Asynchronous Design.

0
source

I do not believe that you can do this without running your own session provider. There is some information on this MSDN page .

ASP.NET . , , , , , . (The - , ASPX , .) , "" , , , , .

, /, , , .

+2

Source: https://habr.com/ru/post/1794546/


All Articles