azure-webjobs

How should I perform a long-running task in ASP.NET 4?

允我心安 提交于 2019-11-26 14:43:30
I am building a website using .NET 4. There are lots of MSDN articles dating from 2003, about using Thread objects and 2007, using Asynchronous Pages in .NET 2 , but that is all pretty stale. I know .NET 4 brought us the Task class and some people vaguely cautioning against its use for this purpose . So I ask you, what is the "preferred" method circa 2011 for running background/asynchronous work under IIS in ASP.NET 4? What caveats are there about using Thread/Task directly? Is Async=true still in vogue? EDIT: Ok, ok, from the answers it's clear the opinion is that I should make a service if I

How should I perform a long-running task in ASP.NET 4?

冷暖自知 提交于 2019-11-26 05:54:49
问题 I am building a website using .NET 4. There are lots of MSDN articles dating from 2003, about using Thread objects and 2007, using Asynchronous Pages in .NET 2, but that is all pretty stale. I know .NET 4 brought us the Task class and some people vaguely cautioning against its use for this purpose. So I ask you, what is the \"preferred\" method circa 2011 for running background/asynchronous work under IIS in ASP.NET 4? What caveats are there about using Thread/Task directly? Is Async=true

Dependency injection using Azure WebJobs SDK?

本小妞迷上赌 提交于 2019-11-26 05:24:40
问题 The problem is that the Azure WebJobs SDK supports only public static methods as job entry-points which means there is no way of implementing constructor/property injection. I am unable to find anything about this topic in official WebJobs SDK documentation/resources. The only solution that I came across is based on service locator (anti) pattern described on this post here. Is there a good way to use \"proper\" dependency injection for projects based on Azure WebJobs SDK? 回答1: Azure WebJobs