Hi, I've written some code in Global.asax that enables to periodically parse my new emails. Here is the code: protected void Application_Start() { AddTask("ListenToEmails", 60); } private static CacheItemRemovedCallback OnCacheRemove = null; private void AddTask(string name, int seconds) { OnCacheRemove = new CacheItemRemovedCallback(CacheItemRemoved); HttpRuntime.Cache.Insert(name, seconds, null, DateTime.Now.AddSeconds(seconds), Cache.NoSlidingExpiration, CacheItemPriority.NotRemovable, OnCacheRemove); } public void CacheItemRemoved(string k, object v, CacheItemRemovedReason r) { //Some code here // re-add our task so it recurs AddTask(k, Convert.ToInt32(v)); } It works well on my local development environment but it doesn't seem to work when I publish it to my Winhost website. Do you know why? Is there a way to debug online?
What is the error message you are getting? Check and make sure you have the proper trust level on your application. http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx