I have written a method inside CATALook to create and email invoices out to customers with the intention of scheduling this to occur periodically via the DNN Scheduler. However, what I am finding is that my function fails because HttpContext is not available when it is called by the scheduler (the function uses HttpContext for various things and I can't figure out how to rewrite it without that dependancy). Now, this problem has been raised numerous times in the past, but I thought that nowadays the problem could be bypassed by setting the Scheduler Mode to Request Method. Request Method supposedly means that the scheduler runs inside a request call and I thought this meant that HttpContext would be available. However my function still fails because inside the function HttpContext.Current Is Nothing. Strangely, the function sometimes works, but I can't figure out what is different when it does work. Can you explain why Request Method doesn't make HttpContext available and what if anything I can do to get hold of it? My last resort is to try "manufacturing" an HttpContext as suggested here: http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/436/Default.aspx |