How do I fire an asynchronous call in asp classic and ignore the response?

前端 未结 4 2015
遥遥无期
遥遥无期 2020-12-16 23:34

Here\'s the gist:

I have a call I want to make in asp, and I do not care about the response. I just want to fire the call and I do not want the page to wait for the

4条回答
  •  独厮守ぢ
    2020-12-17 00:21

    We use async XMLRequest to log errors into Fogbugz in our ASP sites. As its only an error report we don't want our users hanging around waiting for our code to finish so we do it async. This could be for anything from a missing config file, DB timeout, missing lookup in a config file somewhere, etc. Not always mission crytical stuff but good to know about. In those cases the async works a treat and if not then its not the end of the world for us but we've not had any problems with it. We've been using this script which we create and posted in another question:

    System.Net.HttpWebRequest in classic asp?

    Like Anthony says though its not 100% guanenteed to get through. As a possible fix you could sert Response.Buffer = true, render out all your output to the user, call Response.Flush and then do a waitForResponse call. The user will see the whole page and be able to interact with it without any hold up and it gives your async call a bit more time to finish.

提交回复
热议问题