azure-webjobs

AcquireTokenSilent always Failed to acquire token silently

杀马特。学长 韩版系。学妹 提交于 2019-11-30 17:43:09
Using ADAL I have two AuthenticationContext using a Token Cache persisted in SQL. Using AcquireTokenByAuthorizationCode it writes the Token in database, but when using AcquireTokenSilent I always get Failed to acquire token silently. Call method AcquireToken Here are the details for replication the issue: I create a Context AuthenticationContext authContext = new AuthenticationContext(_authority, new AzureAdalCache(companyId, _entries, _unitOfWork)); Then I AcquireToken By Authorization authContext.AcquireTokenByAuthorizationCode(authorizationCode, new Uri(redirectUri), _clientCredential); At

Azure webjobs vs scheduler

半腔热情 提交于 2019-11-30 12:40:42
问题 A very simple question: Why would someone use the Azure Scheduler if Azure WebJobs are free? I couldnt find any topic regarding "azure webjobs vs azure scheduler" The main difference is that the webjob contains everything that the scheduler can do: Scheduler can make HTTP calls WebJob can do that and more (run SQL commands, etc) 回答1: It's 2016. The below answers are no longer accurate. WebJobs now also has a built-in scheduler and the schedule can be defined by a cron expression. When

The 'DefaultConnection-Web.config Connection String' argument cannot be null or empty. VS2013

*爱你&永不变心* 提交于 2019-11-30 12:26:45
问题 When I deploy my project with "Publish as Azure WebJob" using Visual Studio 2013/update 4, I get the error in the title. 回答1: Fixed by removing the following markup from the .pubxml file. You must exit/restart VS after removing the markup (or VS will add it back in). <ItemGroup> <MSDeployParameterValue Include="$(DeployParameterPrefix)DefaultConnection-Web.config Connection String" /> </ItemGroup> 回答2: Reason of the problem Change and/or add the name of the connection string in the web.config

Azure WebJob Command Timeout

℡╲_俬逩灬. 提交于 2019-11-30 11:34:28
We are having issue with Azure Web Jobs. We created a C# console application, zipped it, and created the new Web Job. It's a c# console app that will constantly hit one of our web services to process items in queue. Whenever we run the Web Job, we are getting the following error: 'cmd /c xxxxxxxx....' aborted due to no output and CPU activity for 121 seconds. You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue When we increased the SCM_COMMAND_IDLE_TIMEOUT to 600 (10 minutes). The job DOES run for 10 minutes - and then we get the same error with the same 121 seconds error.

Can I easily stop/start Azure Webjobs without going through the UI or FTP?

爱⌒轻易说出口 提交于 2019-11-30 09:56:08
The Azure management interface is abhorrently slow to load up the web jobs list, and the new portal just times out and fails 95% of the time. We have a lot of WebApps (often deployed per region) in Azure running web jobs. It's extremely cumbersome and slow to have to go through the UI to do all this. I know that the Kudu API offers start/stop mechanisms for web jobs and you can just drop a file called 'disable.job' in the job folder to stop it, but these all require going through the extremely annoyingly slow UI to download publish credentials ($username, password). Is there a PowerShell

Use Azure Application Insights with Azure WebJob

大城市里の小女人 提交于 2019-11-30 08:01:11
The Azure documentation covers many examples of integrating Azure Application Insights into different applications types, such as ASP.NET, Java, etc. However, the documentation doesn't show any examples of integrating Application Insights into a Azure WebJob. Does anyone have link to an example or article that covers how to integrate Azure Application Insights into an Azure WebJob that's built as a Console App? I have written a console application that tracks events and metrics via Application Insights, and I figure a WebJob won't be all that different, by adding the following NuGet packages:

Azure WebJobs ServiceBus returns Exception: found 2 DNS claims in authorization context

本秂侑毒 提交于 2019-11-30 07:59:48
I'm trying to read a message from an Azure ServiceBus queue using an Azure WebJob but it's throwing and exception: Unhandled Exception: System.InvalidOperationException: Found 2 DNS claims in authorization context. I've set the correct connection strings named "AzureWebJobsServiceBus", "AzureWebJobsDashboard" and "AzureWebJobsStorage" The WebJob Program code has been updated to use JobHostConfiguration: class Program { static void Main() { var config = new JobHostConfiguration(); config.UseServiceBus(); var host = new JobHost(config); host.RunAndBlock(); } } And the actual Job method public

Can multiple Azure webjobs share the same assemblies?

邮差的信 提交于 2019-11-30 07:50:57
问题 I have an Azure WebJob that needs to be run 4 different ways and at different times, using 4 different command line parameters. I can set the parameters with a run.cmd but it seems like a waste of space to have 4 sets of assemblies. Can multiple webjobs be defined that run the same set of assemblies, from the same folder. Each webjobs would just have a single run.cmd that called the exe from that folder. 回答1: This is not possible out of the box. There is a way to do it though but at a cost,

Azure C# WebJob using ImageResizer not Properly Setting Content-Type

会有一股神秘感。 提交于 2019-11-30 07:41:26
问题 I'm working on an Azure WebJob to to resize newly uploaded images. The resizing works, but the newly created images do not have their content type properly set in Blob Storage. Instead they are listed application/octet-stream. Here the code handling the resizing: public static void ResizeImagesTask( [BlobTrigger("input/{name}.{ext}")] Stream inputBlob, string name, string ext, IBinder binder) { int[] sizes = { 800, 500, 250 }; var inputBytes = inputBlob.CopyToBytes(); foreach (var width in

Azure WebJob timeout configuration settings

给你一囗甜甜゛ 提交于 2019-11-30 06:24:25
We have an Azure web site with a daily scheduled job. In our case, the scheduled job runs a stored procedure that takes about 10 minutes so there is no local processing. Our web job is terminating after about 4 minutes with this error. Command 'cmd /c ...' aborted due to no output and CPU activity for 121 seconds. You may increase SCM_COMMAND_IDLE_TIMEOUT setting to solve the issue. We've tried adding the following app settings to the web job's app.config file: <appSettings> <add key="SCM_COMMAND_IDLE_TIMEOUT" value="100000" /> <add key="WEBJOBS_IDLE_TIMEOUT" value="100000" /> </appSettings>