azure-webjobs

How can I sign a JWT token on an Azure WebJob without getting a CryptographicException?

无人久伴 提交于 2019-12-30 06:55:03
问题 I have a WebJob that needs to create a JWT token to talk with an external service. The following code works when I run the WebJob on my local machine: public static string SignES256(byte[] p8Certificate, object header, object payload) { var headerString = JsonConvert.SerializeObject(header); var payloadString = JsonConvert.SerializeObject(payload); CngKey key = CngKey.Import(p8Certificate, CngKeyBlobFormat.Pkcs8PrivateBlob); using (ECDsaCng dsa = new ECDsaCng(key)) { dsa.HashAlgorithm =

Command Line Arguments to Azure Webjobs

二次信任 提交于 2019-12-30 06:24:28
问题 I'm in the process of migrating a couple of Jobs that were previously scheduled and run through Quartz.Net to Azure Webjobs. Using Quartz.Net allowed me to have all the (very compact) Job Classes in the same project as the console program entry point initializing the scheduler. Now I would like to retain that structure without having to create a discrete console application project for each and every web job. Is there currently any way to configure a command line argument for continuous web

Error loading hostpolicy.dll while deploying .NET Core console app to Azure WebJobs

社会主义新天地 提交于 2019-12-30 06:02:45
问题 I have followed this tutorial to deploy a .NET Core console application to an Azure Web Service WebJob. My app is running locally without any issue (with dotnet 1.0.0-preview2-003131 ) but when I try to run it from Azure console I have the following error : Failed to load the dll from [D:\local\VirtualDirectory0\site\wwwroot\app_data\jobs\triggered\PopcornExportWebJob\hostpolicy.dll], HRESULT: 0x800700C1 An error occurred while loading required library hostpolicy.dll from [D:\local

Microsoft Azure,Webjob, in which timezone a webjob runs if I schedule a webjob to run daily at specified time using cron expression

独自空忆成欢 提交于 2019-12-30 03:09:31
问题 I scheduled a webjob to run daily at 2 am using cron expression (0 0 2 * * *) following tutorial from Create a scheduled WebJob using a CRON expression and my server is created in "north central US" region, so i hope it should run in US central timezone but seems it running at different time than what i specified. 回答1: Based on the comments mentioned here, WebJobs run into the timezone configured for the WebApp where your WebJob is hosted. From this post: Assuming you have not configured

Fetching files from FTP server via Azure webjobs

扶醉桌前 提交于 2019-12-25 09:09:50
问题 Recently I came across one of the requirements to read .csv files from FTP server and made them available to external system for processing. The system should read as soon as file is available on FTP server. I thought about the solution, 1. FTP Server --> 2. Custom Windows service used as poller to know whether a new file has came--> 3. Put a message in a queue --> 4. external system as subscriber to queue. Now I am thinking that whether Azure webjobs/functions can be used here in place of

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

Logging in Azure web jobs

二次信任 提交于 2019-12-25 06:56:00
问题 I am working with Azure web jobs. Also I am aware that the TextWriter is used to write logs in case of web jobs (VS 2013). However, The logs are created under the Output logs folder under the blob container. THese are not user friendly. I have to open each file to read the message written to it. Is there any way to change the logging to table, which is user friendly to read? Thanks in advance. 回答1: I'm not sure if there's a "native" way to do this, but you can add Azure Storage Client through

Dnx (asp.net 5) Console app as Azure Web Job connection strings configuration not found

大憨熊 提交于 2019-12-24 13:47:57
问题 In all of the manuals about how to get the Storage connection for azure web jobs it is said to have those two variables AzureWebJobsDashboard, AzureWebJobsStorage in the connection strings. It works properly for ordinary .net, but it's quite an issue with DNX, since it seems that ConfigurationManager is not available there. So I have added the two strings to the ConnectionStrings in the portal, but I cannot find a good way how the Web Job would read them automatically. I ended up reading them

IConfiguration in WebJobs

喜欢而已 提交于 2019-12-24 11:12:14
问题 I have an ASP.NET Core WebJobs project that is using class libraries from an ASP.NET Core web app. In the web app, I'm simply using IConfiguration to access all my settings. In my WebJobs app, I have the following lines which appear to use IConfigurationRoot . var configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .Build(); So, how do I go from IConfigurationRoot to IConfiguration ?

Why are config transforms not applied when I manually publish a console app as an Azure webjob?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 09:15:47
问题 I have a console application that I am deploying to Azure as a Web Job. I do this manually from Visual Studio 2015 by right-clicking the project and choosing "Publish as Azure WebJob". I am now at a point where I need to deploy this app to several different environments (ex: dev, test, prod etc). In each environment the console app needs to run with different config settings. To get this done, I've installed Slow Cheetah v2.5.48 and setup multiple config transform files - one for each