azure-webjobs

.NET Core 2 Console App Dependencies Issue on Azure

删除回忆录丶 提交于 2019-12-20 02:51:02
问题 Short version of the problem: I'm having difficulties including the assemblies my .NET Core Console App depends on. Initially, the assemblies from NuGet packages were not included in the bin folder even though I could run the app in Debug mode without any problems. Found an article that suggested that I should add <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> in the myapp.csproj file which I did. Doing so included the dll files for the NuGet packages in the bin folder BUT

Azure webjob not appearing to respect MaxDequeueCount property

雨燕双飞 提交于 2019-12-19 05:44:34
问题 I've got an Azure webjob with several queue-triggered functions. The SDK documentation at https://docs.microsoft.com/en-us/azure/app-service-web/websites-dotnet-webjobs-sdk-storage-queues-how-to#config defines the MaxDequeueCount property as: The maximum number of retries before a queue message is sent to a poison queue (default is 5). but I'm not seeing this behavior. In my webjob I've got: JobHostConfiguration config = new JobHostConfiguration(); config.Queues.MaxDequeueCount = 1; JobHost

The binding type 'serviceBusTrigger' is not registered error in azure functions c# with core tools 2

故事扮演 提交于 2019-12-19 02:47:11
问题 I open a fresh new azure functions project, my packages are: Microsoft.Azure.WebJobs 3.0.0-beta4 Microsoft.Azure.WebJobs.ServiceBus 3.0.0-beta4 Microsoft.NET.Sdk.Functions 1.0.7 NETStandardLibrary 2.0.1 I use servicebustrigger and my function code is basic: public static class Function1 { [FunctionName("OrderPusherFunction")] public static Task Run([ServiceBusTrigger("orders","orderpusher", Connection ="ServiceBus")] string myQueueItem, TraceWriter log) { log.Info($"C# Queue trigger function

AcquireTokenSilent always Failed to acquire token silently

心已入冬 提交于 2019-12-18 18:58:32
问题 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

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

帅比萌擦擦* 提交于 2019-12-18 12:53:28
问题 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

Rename an Azure Function

不羁岁月 提交于 2019-12-18 11:38:15
问题 How to rename an Azure Function ? I want to replace a default 'HttpTriggerCSharp1' name to my own. At the moment unfortunately this name is included in the function url and there is no option to change it: https://functions-xxx.azurewebsites.net/api/HttpTriggerCSharp1 回答1: The UI does not directly support renaming a Function, but you can work around this using the following manual steps: Stop your Function App. To do this, go under Function app settings / Go To App Service Settings, and click

Continuous Web Job stops even if Always On is enabled

人走茶凉 提交于 2019-12-18 09:49:10
问题 I have created an Azure Web App on Standard Service Plan with Always On option enabled. On this App I haven't published any web site. I have only published a Continuous Web Job. The problem is that although I have enabled the Always On option, I can see in the Web Job logs that the Web App stopped. Here are the Web Job logs: [09/29/2015 07:35:26 > 189701: SYS INFO] WebJob is still running [09/29/2015 08:51:54 > 189701: SYS INFO] WebJob is stopping due to website shutting down [09/29/2015 08

How to Enable/Disable Azure Function programmatically

本秂侑毒 提交于 2019-12-18 06:08:47
问题 Is there a way to programmatically enable/disable an Azure function? I can enable/disable a function using the portal under the "Manage" section, which causes a request to be sent to https://<myfunctionapp>.scm.azurewebsites.net/api/functions/<myfunction> The JSON payload looks a bit like: { "name":"SystemEventFunction", "config":{ "disabled":true, "bindings":[ // the bindings for this function ] } // lots of other properties (mostly URIs) } I'm creating a management tool outside of the

Publish simple Asp.Net Core App (.Net Framework) with WebJob

无人久伴 提交于 2019-12-18 04:19:17
问题 I would like to create a simple ASP.NET Core Web Application (.NET Framework) and publish a WebJob alongside it to Azure. I'm using Visual Studio 2017, but the result seems to be the same in VS2015. To start, I create the corresponding project in VS2017: I select the basic web application template: At this point I get a bit lost. In the older Asp.Net MVC 5 approach, I used to be able to click on the Asp.Net project and find "Add => New Azure Webjobs Project". The WebJob would then always be

Azure Web Job writes files in a website's directory

淺唱寂寞╮ 提交于 2019-12-18 04:02:58
问题 I attached a Web Job to my Azure website. The webjob prepares a file and I want to save it on a proper folder in the website. Environment.CurrentDirectory run on the script returns a path under a Temp directory: Temp\jobs\triggered\WEBJOBNAME\q0uwrohv.x5e I tried to go down on the directory tree: string path = Path.Combine(Environment.CurrentDirectory, @"..\..\..\..\..\Data") But it doesn't work: C:\DWASFiles\Sites\WEBSITENAME\Temp\jobs\triggered\WEBJOBNAME\q0uwrohv.x5e\..\..\..\..\..\Data