Pergunta

What happens behind the scenes 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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top