开发者

Using AJAX to run a webservice in the background

开发者 https://www.devze.com 2023-02-28 01:09 出处:网络
I basically need to do this, but unfortunately my hosting provider doesn\'t give me \"Full Trust\" so I can\'t run threads. Is there a way to do this using AJAX?

I basically need to do this, but unfortunately my hosting provider doesn't give me "Full Trust" so I can't run threads. Is there a way to do this using AJAX?

//Updates Information in Database
Thread threadFind = new Thread(LoadFind);
threadFind.Start();

Response.Write("Send old information to users");

I don't want my users to have to wait a开发者_Go百科t all for a response, so I can send them the old information. However, while they are on the page I want another thread (or something that works like a thread) to update the information for the next user that visits.

Thank you.


Maybe you can play with asynchronous pages:

  • http://msdn.microsoft.com/en-us/magazine/cc163725.aspx


Create a service, that is callable through HttpGet (via WCF, or a simple ASHX handler) and call it from JS (using JQuery's .ajax() or .get() methods for example).

0

精彩评论

暂无评论...
验证码 换一张
取 消