What happens to orphaned/killed async AJAX WebMethod or PageMethod calls?
What happens behind the scene开发者_开发知识库s if I make an AJAX PageMethod or WebMethod call from, say, "Default.aspx" and then I quickly navigate away to a different page, say, "Settings.aspx" before the initial PageMethod has returned?
What kind of housekeeping, if any, takes place on either the browser or the ASP.NET back end?
In other words, where do abandoned AJAX PageMethod calls go to die...and what is their funeral like?
There's no magic here. You made a request. The server presumably received the request. Most likely, it will act upon the request and send a response.
Of course, if the connection has been closed, the server will receive an error when it sends the response, but it will deal with that common occurence.
I don't know whether or not the browser will close any connections created in one top-level window when you destroy it in order to navigate to another document. I suspect it will, depending on the browser.
精彩评论