azure-webjobs

Azure Stop a Triggered Web Job

删除回忆录丶 提交于 2019-12-21 07:19:11
问题 In Azure, Once a Triggered Web Job has begun? What do we need to do - to stop it? Background: Our Web Job populates a Service Bus Queue that then scale out our worker roles - our worker roles are using a 3rd party API - and are getting errors. This is causing our queue to grow larger and larger - and creating more and more worker roles. This is expensive. 回答1: as Kobynet explained above we are using the kudu api and we have the following powershell snippet for stopping the proccess $username

Azure Webjob TextWriter logger being disposed in the middle of my method

断了今生、忘了曾经 提交于 2019-12-21 04:11:38
问题 I'm using a Webjob with the Windows Azure Storage SDK. When a new item shows up in a Queue, a method in my class is invoked. According to the SDK docs, if I take a TextWriter as a parameter to my method, the SDK will provide me with a TextWriter that I can write to which will show up in the Webjob's logging infrastructure. This makes it pretty easy to diagnose issues and troubleshoot things. public async static void ProcessQueueMessage([QueueTrigger("queueName")]MyModelType model, TextWriter

Communication between a WebJob and SignalR Hub

。_饼干妹妹 提交于 2019-12-21 04:06:15
问题 I have the following scenario: I have an azure webjob (used to send mails) and I need to check the progress of the webjob in my web application. I am using SignalR to communicate with clients from my server. When I want to send an email, I push a message in the queue and the azure webjob does his job. The question is, how can I communicate the progress of the webjob to the client? Originally my idea was to push a message from the webjob, so the Hub could read it from the queue. Then, I would

AzureWebJobsDashboard Configuration Error

谁都会走 提交于 2019-12-20 16:24:12
问题 I created a new Azure WebJob project in Visual Studio 2015 using .NET Framework 4.6. In the app.config, I set three connection strings: AzureWebJobsDashboard AzureWebJobsStorage MyDatabaseConnectionString The AzureWebJobsDashboard and AzureWebJobsStorage connection strings are identical and they're both pointing to my storage account. I'm including one of the connection strings -- since they're both identical, except the "name". <add name="AzureWebJobsDashboard" connectionString=

How can I instantiate OWIN IDataProtectionProvider in Azure Web Jobs?

非 Y 不嫁゛ 提交于 2019-12-20 09:38:03
问题 I need an instance of IDataProtectionProvider to generate email confirmation tokens using the Identity Framework UserManager in an Azure Web Jobs worker: var confirmToken = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); This crashes because a null IUserTokenProvider<User, int> was passed to the UserManager<User, int> upon constuction. In the MVC application an instance is created like this: public class OWINStartup { public void Configuration(IAppBuilder app) { var

No parameterless constructor error in WebJobs with .NET Core and Ninject

大兔子大兔子 提交于 2019-12-20 07:51:30
问题 I'm trying to do a bit of a balancing act here. Currently Azure WebJobs don't support .NET Core. With some help, I created a .NET Core Console App and made it work as a WebJob. On top of that I'm trying to implement Ninject for DI. Code compiles fine but when I run it, I'm getting the "No parameterless constructor is defined for this object." error -- see below. I may be in a bit of unchartered territory here with Azure WebJobs, .NET Core 2.0 and Ninject but any idea what may be causing this?

Shared lock between App Service and Webjob

给你一囗甜甜゛ 提交于 2019-12-20 07:16:47
问题 I want to have a shared lock between the Webjob and the App Service code. I have tried lock keyword as well as mutex in C# but they don't seem to be working. Another alternative I could think of is Blob lease which is also the locking mechanism used for locking within webjobs environments as written here. Do azure webjobs run in a totally separate environments from the App Service such that the shared locks are not working, or am I missing something ? Is there any other way ? 回答1: WebJobs run

WebJob Not Loading SendGridMail Assembly

笑着哭i 提交于 2019-12-20 04:08:33
问题 I'm trying to use the SendGrid extensions for Azure WebJobs. I've tried to follow the example, but, unfortunately, the WebJob app crashes with the following error: Could not load file or assembly 'SendGridMail, Version=6.1.0.0, Culture=neutral, PublicKeyToken=2ae73662c35d80e4' or one of its dependencies. The system cannot find the file specified. Having run into something similar once before involving NewtonSoft's Json, I tried to fix the problem by adding the following to app.config:

Running Azure PowerShell commands from a webjob

一个人想着一个人 提交于 2019-12-20 04:03:26
问题 Update : I used Azure Automation per BenV's suggestion below and it worked! More info can be found here. I have a PowerShell script that needs to run a few Azure commands like New-AzureStorageContext , Get-AzureStorageContainer , Set-AzureStorageBlobContent , etc. I'd like to run the script as a webjob. When I run this script as a webjob I receive errors below on the Azure commands. Other PS commands run successfully from the webjob. I searched StackOverflow and couldn't find posts for these

Azure WebJobs NuGet Package Error

跟風遠走 提交于 2019-12-20 03:41:57
问题 I would like to know if someone has experienced running error on Azure WebJobs Queue sample on Visual Studio templates. The sample running to issue after I updated all the packages on NuGet manager. This is the error message: System.InvalidOperationException HResult=0x80131509 Message=Microsoft.WindowsAzure.Storage is deployed incorrectly. Are you missing a Table Service assembly (Microsoft.Data.Services.Client, Microsoft.Data.OData or Microsoft.Data.Edm) or a related binding redirect? Source