Question

First let me say what I am attempting to accomplish. I would like to notify the user(s) of my web application if changes are made to a document that they are currently working on. I intend to use long polling to achieve my desired results. When I send a request to the long polling page (which polls and sleeps for about 250ms between iterations until a timeout expires) and attempt to simultaneously load another page on my web site, the second request is queued until the first is complete. Is there any solution to this problem? Ahead of time, using a web garden or any form of session management than InProc is not acceptable in this situation. Thanks everyone for any help you can offer.

Was it helpful?

Solution

This is probably the session synchronization causing requests to be handled sequentially. If you can change your long-polling handler to not be session aware, then it should fix the problem.

You didn't say what the target is but if it's an .ashx or custom IHttpHandler that does not implement IRequiresSessionState then the request will not attach to (or synchronize with) the session. Of course this also means the long polling request will not have access to the session.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top