azure-webjobs

Application Insights to azure webjob .Net Core 2.0

余生颓废 提交于 2019-12-07 06:10:40
问题 How to add application insights telemetry (Application Insights) to azure webjob ? 回答1: With recently released WebJob SDK 3.0, you can add ApplicationInsights in the ConfigureLogging method public static async Task Main(string[] args) { var builder = new HostBuilder() .ConfigureWebJobs(b => { b.AddAzureStorageCoreServices().AddAzureStorage(); }) .ConfigureAppConfiguration(b => { // Adding command line as a configuration source b.AddCommandLine(args); }) .ConfigureLogging((context, b) => { b

Azure WebJob concurrency when using ServiceBusTrigger

余生颓废 提交于 2019-12-07 04:07:21
问题 I have been using Azure Storage Queues to feed a WebJob, using the QueueTrigger attribute. I configure my QueueTrigger to dequeue a number of items for concurrent processing, like this: public static void Main() { JobHostConfiguration config = new JobHostConfiguration(); config.NameResolver = new QueueNameResolver(); config.Queues.NewBatchThreshold = 10; JobHost host = new JobHost(config); host.RunAndBlock(); } public static void ExecuteStorageQueueItem([QueueTrigger("%AzureQueueName%")]

X509Certificate2 failing in Azure Webjobs calling Google API

扶醉桌前 提交于 2019-12-07 03:52:14
问题 I have a console app that is scheduled using Azure WebJobs. The execution always fails when attempting to read the private key of p12 certificate. Interestingly enough I can't catch the exception, I've had to use good old Console.WriteLine to debug. Here is my snippet of code: var certificate = new X509Certificate2(data, "notasecret", X509KeyStorageFlags.Exportable); ServiceAccountCredential credential = new ServiceAccountCredential( new ServiceAccountCredential.Initializer

Azure WebJobs SDK ServiceBus connection string 'AzureWebJobsAzureSBConnection' is missing or empty

放肆的年华 提交于 2019-12-07 03:01:08
问题 I created an Azure Function App in Visual Studio 2015. The App has a trigger for service bus queues. The app works perfectly when I run it locally. It is able to read the data from the Service Bus queue (configured via a variable named AzureSBConnection) and log it in my database. But it gives me the following error when deployed in Azure: Function ($ServiceBusQueueTriggerFunction) Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.ServiceBusQueueTriggerFunction'. Microsoft

Monitoring Azure WebJobs

南楼画角 提交于 2019-12-07 02:56:40
问题 How can I monitor azure web jobs when their last run result is failed or if a continuous web job is not running? I have found cloudmonix which does work. Are there any other products out there? Zapier only has a zap for triggered web jobs not running continuously. 回答1: I dont know of any other products other than CloudMonix that can monitor your Webjobs, but if all you need is alerts when a job fails, you can probably write a console program yourself that checks against your Webjobs with

Where are Azure WebJob's BlobInput and BlobOutput classes?

痞子三分冷 提交于 2019-12-07 02:50:17
问题 I am creating a Azure WebJob console application that resizes images uploaded to blob storage. When following any of the code samples online I am unable to reference and use the BlobInput and BlobOutput input parameter attributes. I am using the NuGet package Microsoft.Azure.Jobs 0.3.0-beta (and Microsoft.Azure.Jobs.Core). Which namespaces are BlogInput and BlobOutput found in? Is there another NuGet package that I need? Here is my code which does not compile because it cannot resolve

Some assemblies not being included when deploying Azure webjobs from Visual Studio 2013

﹥>﹥吖頭↗ 提交于 2019-12-07 02:44:24
问题 I've got a Visual Studio 2013 class library project, directory structure like this: \MyClassLibraryProject \ExternalLibraries 3rdPartyLib.dll \bin \Debug \Release etc. Inside ExternalLibraries I copied some 3rd party assemblies which I then referenced from the project (Copy local = true). I compile the project and in my Release directory I of course see my MyClassLibraryProject.dll and the 3rd party DLLs like 3rdPartyLib.dll, etc.. Good so far. Then I have another project (Console app - Azure

Last logging parameter of Azure Function (ILogger or TraceWriter) not accepted

本秂侑毒 提交于 2019-12-07 01:31:03
问题 After upgrading my own project from an earlier (a few months back) version of Azure Functions to current, I get the following error upon launching from VS. GetLoginUrl: Microsoft.Azure.WebJobs.Host: Error indexing method 'Login.GetLoginUrl'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type ILogger. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the

What is the connection string to use Azure Storage Emulator with a Webjob?

风流意气都作罢 提交于 2019-12-06 23:04:36
问题 I have a simple WebJob which I wish to test with the Azure Storage Emulator. I currently have set the AzureJobsRuntime and AzureJobsData set to use development storage as follows: <connectionStrings> <add name="AzureJobsRuntime" connectionString="UseDevelopmentStorage=true;" /> <add name="AzureJobsData" connectionString="UseDevelopmentStorage=true;" /> </connectionStrings> The webjob is very simple: public static void Main(string[] args) { JobHost host = new JobHost(); host.RunAndBlock(); }

New and old WebJob versions both running following a deployment

倖福魔咒の 提交于 2019-12-06 21:00:30
I have a continuous WebJob deployed via the Kudu API to /api/continuouswebjobs/{job name} as outlined here . The App Service I'm deploying to has just a single instance running. On occasion it's looking like the previous version of a WebJob is not removed following a deployment and it runs concurrently with the new version. This can continue to occur and I've seen up to nine processes running concurrently. Application names redacted but they are identical for each process: Stopping the WebJob via the Azure Portal causes the process under w3wp (scm) to stop but not the other "detached"