azure-webjobssdk

Azure functions - How to read form data

旧时模样 提交于 2020-05-12 02:49:04
问题 How to read form data in Azure functions ? I tried to do it in several ways, but always I get an error, eg.: using System.Net; public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) { dynamic data = await req.Content.ReadAsFormDataAsync(); return req.CreateResponse(HttpStatusCode.OK, $" {data}"); } Error: Exception while executing function: Functions.FormTrigger. System.Net.Http.Formatting: No MediaTypeFormatter is available to read an object of type

Azure webjob logs - looking for logs that detail the SDK's handling of queue triggered items

元气小坏坏 提交于 2020-01-24 20:11:29
问题 As shown in my Stack Overflow question Azure webjob not appearing to respect MaxDequeueCount property, I'm troubleshooting a problem where despite my setting of the MaxDequeueCount property to 1, some items are dequeued many times before they're poisoned (in fact some items may never be poisoned at all and just dequeue, fail and are retried and fail endlessly). The Webjobs SDK handles the retries and poisoning of queue triggered messages automatically and I'm looking for logs that contain

Azure webjob logs - looking for logs that detail the SDK's handling of queue triggered items

北城以北 提交于 2020-01-24 20:11:26
问题 As shown in my Stack Overflow question Azure webjob not appearing to respect MaxDequeueCount property, I'm troubleshooting a problem where despite my setting of the MaxDequeueCount property to 1, some items are dequeued many times before they're poisoned (in fact some items may never be poisoned at all and just dequeue, fail and are retried and fail endlessly). The Webjobs SDK handles the retries and poisoning of queue triggered messages automatically and I'm looking for logs that contain

Continuous WebJobs and CancellationToken

寵の児 提交于 2020-01-14 08:00:08
问题 I don't get the mechanics behind the cancellation token and the web jobs. I know I can use Microsoft.Azure.WebJobs.WebJobsShutdownWatcher().Token to get the token and react on token.IsCancellationRequested eg when the WebJobs are updated. Scenario: Continuous job, triggered by a service bus message. The job calls a method in my data layer. This method does some updates on different tables on an azure sql database. This method runs for about two minutes. Now I would pass the token to the data

Azure WebJob QueueTrigger message is not deleted from queue

五迷三道 提交于 2020-01-13 10:37:12
问题 I have WebJob running continuously using the 1.0.0 WebJobs SDK. Here is configuration code. public static void Main() { var config = new JobHostConfiguration(); config.Queues.MaxDequeueCount = 1; config.Queues.BatchSize = 1; var host = new JobHost(config); host.RunAndBlock(); } Here is my job function signature. public static void HuntVkusniyBlogRss([QueueTrigger("queue-rss")] string message, DateTimeOffset expirationTime, DateTimeOffset insertionTime, DateTimeOffset nextVisibleTime, string

Azure Function - Resize image stored in a blob container

人盡茶涼 提交于 2020-01-09 11:19:42
问题 I've answered this question related to Azure Webjob and Resizing a image stored as a blob and so I am trying to do the same using a Function App Each time a new blob is uploaded, I send a a new queue message. My function is triggered by the queue message and bind to the uploaded blob. I also have a second input binding that binds to another CloudBlobContainer to be able to upload new resized images to another blob container. My function looks like that: #r "System.Web" using System.IO; using

Using an Azure WebJob to read from an EventHub

我的梦境 提交于 2020-01-05 06:01:27
问题 I am trying to consume EventHub messages from a WebJob, without avail. The job builds and runs without throwing any exceptions, but the trigger is never called. I am referencing Microsoft.Azure.WebJobs, Microsoft.Azure.WebJobs.Extensions and Microsoft.Azure.WebJobs.ServiceBus v2.0.0.0-beta2. Here's my code: Program.cs: public static void Main() { var eventHubConfig = new EventHubConfiguration(); string eventHubName = "myHub"; eventHubConfig.AddReceiver(eventHubName, "Endpoint=sb://xxxx

Using an Azure WebJob to read from an EventHub

。_饼干妹妹 提交于 2020-01-05 06:00:27
问题 I am trying to consume EventHub messages from a WebJob, without avail. The job builds and runs without throwing any exceptions, but the trigger is never called. I am referencing Microsoft.Azure.WebJobs, Microsoft.Azure.WebJobs.Extensions and Microsoft.Azure.WebJobs.ServiceBus v2.0.0.0-beta2. Here's my code: Program.cs: public static void Main() { var eventHubConfig = new EventHubConfiguration(); string eventHubName = "myHub"; eventHubConfig.AddReceiver(eventHubName, "Endpoint=sb://xxxx

How can I set a folder name and file name in Azure Functions SaaS File bindings?

痞子三分冷 提交于 2019-12-25 09:16:04
问题 I am trying to use a SaaS File trigger to listen for new files in an FTP site. First of all, can you even define a variable folder, like "path": "inputTest/{folder}/{fileName}" ? Or, perhaps, listen to new files in all subfolders and include the path in the file name, like inputTest/{file} where file might equal "subfolder/fileName.txt" ? The idea here is that I will have multiple clients uploading files into their own directories, and I don't want to create a new function/trigger for each

WebJob Failing on Azure but Locally Running Fine

我与影子孤独终老i 提交于 2019-12-25 08:31:45
问题 I'm running a WebJob locally -- still connecting to the same Storage service on Azure -- but when I publish it on Azure, it's failing. It was failing locally as well with the same error but I was able to fix it and run it perfectly fine on my local dev machine. Any idea why it may fail on Azure?. To reiterate the point, even though it's running locally, it still connects to the same queue and storage account on Azure. So the only thing that's running locally is the code. Here's the error I'm