There is a page that opened the first user. For her, the server responds to a request in 10 seconds.

At this time, another user wants to turn to another page. Here the server will run for 1 second.

At a time when the server "thinks" over the first page, the second user will have to wait (10 + 1 = 11 seconds).

What can be done so that the server can respond to the second user's request while working on the first request at the same time? It is clear that you can make Async = "true" on the aspx page and process the request by wrapping them in special methods.

And you can make it so that for each request you create your own trade (stream, thread), writing, for example, in the config-file? That is, "in one fell swoop"?

    1 answer 1

    ASP.NET, like any other server, performs requests from different users in parallel.

    The only thing that can line up requests in such a tight queue is the use of Session State. If a

    • enable session use
    • open a tab in the browser - go to the site, having received a session cookie
    • open the second tab in the browser, and measure, assuming that "different tabs / windows are different users"

    then the observed result will be exactly the same as described in the question - because the browser will use a common session cookie in each tab or window. ASP.NET will consider it as requests within one session, and will execute them strictly consistently.

    The only way to avoid such unobvious and inhibitory behavior is not to use the session, either directly or in the form of ASP.NET MVC TempData .