Microsoft Azure logo

Enabling local cache for an Azure App Service

This article explains one easy way for you to improve the performance and uptime of your Azure App Service. I’ll explain a simple but kind-of-hidden and surprisingly badly documented feature – Azure App Service Local Cache, that is – which might make a huge difference. It sure did for me! Since it’s such a no-brainen, I’m kind of half expecting everyone else to already having known about this, but since nobody told me about it, I’m going to document it for future use. Background Let’s…Continue reading Enabling local cache for an Azure App Service

Azure Functions runtime throws an "Insufficient memory to continue the execution of the program." error. What do?

How to resolve error “Insufficient memory to continue the execution of the program.” when debugging Azure Functions locally?

This article describes a solution to an error “Insufficient memory to continue the execution of the program.” I was debugging an Azure Function locally and ran into it – it stopped my Azure Function from starting at all. So, this is what I got: Ohh… kay..? My development machines have plenty of RAM, surely enough to run an Azure Function! So what gives? Posts Related to “How to resolve error “Insufficient memory to continue the execution of the program.” when debugging Azure Functions locally?”:The Scary…Continue reading How to resolve error “Insufficient memory to continue the execution of the program.” when debugging Azure Functions locally?

AppInsights logo

How to fix weird “Production Breakpoints” errors in an Azure App Service?

This article describes a curious fix I found to an issue where Application Insights (seemingly) crashes your Azure App Service, leaving behind interesting and non-descriptive errors in the Application Event Logs. Problem Does your Application Insights look like this, too? Event logs full of “Production Breakpoints” with weird errors about named pipes? In my case, the errors were something like these below: IfFailRet(pNamedPipe->Read((BYTE*)&controlRequest, sizeof(SnapshotHolderControlStruct))) failed in function CSnapshotHolder::HandleNewPipeConnection: -2147024787 And: CNamedPipe::Read – Read from named pipe failed: 0x8007006D. These errors would always pop up at…Continue reading How to fix weird “Production Breakpoints” errors in an Azure App Service?

HTTP Error 500.32 - ANCM Failed to Load dll

How to fix “HTTP Error 500.32 – ANCM Failed to Load dll”

Yikes – ever ran into this error after deploying your ASP.NET Core web application to an Azure App Service? Yeah, me too. And when it’s a production deployment, and the error didn’t happen in test/QA environment, that’s even more fun. This article describes a couple of ways to fix it, though. You wouldn’t believe these 3 solutions to fix the error “500.32”, and what they look like now! Oh heavens, what have I done with that subheading? All of that time watching Growth Hacking YouTube…Continue reading How to fix “HTTP Error 500.32 – ANCM Failed to Load dll”

Azure DevOps - Always Be Shipping!

Fun with Azure DevOps NuGet package versioning!

This article will briefly explain the different NuGet package versioning schemes – both automatic and manual – available. Then we’ll take a look at how to implement a nifty, and quite frankly, downright elegant automatic versioning scheme for your NuGet packages. Okay – returning from quite a trip down another rabbit hole, I think it’s a good time to document some of my findings in regards to Azure DevOps NuGet package versioning! This seems to be another area, where the documentation certainly does exist, but…Continue reading Fun with Azure DevOps NuGet package versioning!

Azure Functions Core Tools (2.4.432) Function Runtime Version: 2.0.12332.0 - The system cannot find the file specified. Press any key to continue . . .

Azure Functions host quits with “The system cannot find the file specified”

So, another interesting issue I ran into when developing Azure Functions locally. What an endless bag of funsies! 😁 This time, the issue was simple but infuriating – my Azure Functions host would just silently close when debugging: none of the breakpoints would be hit, no information would be logged anywhere. Azure Functions Core Tools (2.4.432 Commit hash: 3371a87e0fce2aa35986c0de8e77d5d618163b91) Function Runtime Version: 2.0.12332.0 The system cannot find the file specified Press any key to continue . . . I first encountered this by the Azure…Continue reading Azure Functions host quits with “The system cannot find the file specified”

Azure Functions host be like ...

How to extract more information out of your Azure Functions host failing silently?

I dont’ know about you, but it’s happened to me a few times: fire up your Azure functions project, hit F5 to start debugging, project builds without errors, Azure Functions host starts… And shuts down right away. This article has a few quick and simple tips on how to extract a bit more information from Azure Functions host (func.exe), when it’s just silently failing. This means by default you won’t get any information about what’s going wrong. However, a couple of steps should get you…Continue reading How to extract more information out of your Azure Functions host failing silently?

SOLVE ALL THE ERRORS!

App Service refuses connections with error: “No connection could be made because the target machine actively refused it”

This blog post describes a very specific fix to a very specific issue. In a software project that consisted of a desktop client application and some APIs hosted on Azure, we ran into an error where some connections to APIs would fail with an error like this: No connection could be made because the target machine actively refused it. What gives? Description Imagine this: You’re connecting to an API hosted by an Azure App Service (“Web App”, if you wish) using an application or a…Continue reading App Service refuses connections with error: “No connection could be made because the target machine actively refused it”

Always ship Azure DevOps.

How to use the right version of the WebDriver on hosted agents in Azure DevOps?

We were working on getting our Robot Framework tests running during our builds on Azure DevOps. However, using hosted agents, it was quite a struggle to get all of the dependencies on the agent and make sure the tests can access the browser on the build machine. In our case, we were running the tests in Chrome. For this, we needed Robot Framework and some of its dependencies to be installed on the machine. Luckily, that wasn’t too complicated – however, getting the WebDriver that…Continue reading How to use the right version of the WebDriver on hosted agents in Azure DevOps?

Azure Functions CLI - such a pretty logo for such an awesome functionality

How to enable verbose logging for Azure Functions?

This post describes how you can easily enable debug/verbose information for your Azure Functions for a lightweight and built-in way to extract just a bit more information out of your Azure Function executions. There’s different methods available for Azure and your local development environment. Problem Azure Functions are awesome. But by default, your tools on gathering information without some additional configuration are not that great. The “monitor” view of the function doesn’t give you more than an excerpt of the console. This applies not only…Continue reading How to enable verbose logging for Azure Functions?

Azure Functions CLI - such a pretty logo for such an awesome functionality

How to access EF’s DbContext in an Azure Function on V2 runtime?

This post describes how you can access your Entity Framework Core model classes and the database context in your Azure Functions. In my example I’m using EF Core 2.1, but the main principle should be the same for later versions as well. Please note, that I use Azure functions runtime 2.x (and so should you!) Another easy one, that I was unable to find much guidance on! But first, let’s start with the basics. Why would you want to have this setup? Why would you…Continue reading How to access EF’s DbContext in an Azure Function on V2 runtime?

Azure Functions CLI - such a pretty logo for such an awesome functionality

Sudden “Function compilation error” for an Azure Function

Welp – another interesting error encountered while deploying Azure Functions to Azure. So, everything runs nicely locally, but when you deploy your well-tested, functional and pretty code to run them in the cloud, you’ll just get these ugly and unfriendly errors. Long story short, “Function compilation error” is what you’re faced with. Example error below: Function compilation error Microsoft.CodeAnalysis.Scripting.CompilationErrorException : Script compilation failed. at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 314 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionLoader.cs : 55 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async…Continue reading Sudden “Function compilation error” for an Azure Function

Low-code / no-code basically means serverless

How to remove Azure Functions without deleting the Functions App?

Have you ever run into a situation, where you just wanted to remove the currently standing function definitions from your app service without actually nuking the whole Functions app? I have! App Service configuration is usually easy to manage programmatically or by scripting, so even if you need to redo the deployment, it should be fairly straightforward. But what if you don’t have the setup scripted, and have already configured everything the way you like it – you’d really like to NOT nuke the whole…Continue reading How to remove Azure Functions without deleting the Functions App?

Have you tried turning it off and on again?

How to fix “AADSTS90008: The user or administrator has not consented to use the application”?

A couple of days ago, I got a comment asking how to fix error AADSTS90008 when developing an application using Azure Active Directory The error in question was this: AADSTS90008: The user or administrator has not consented to use the application with ID ‘[guid]’. This happened because application is misconfigured: it must require access to Windows Azure Active Directory by specifying at least ‘Sign in and read user profile’ permission. While the error itself is usually fairly simple, explaining what to do in a comment…Continue reading How to fix “AADSTS90008: The user or administrator has not consented to use the application”?

Get-Command -Module AzureRM.Profile. You're seeing it correctly - it doesn't have a Logout-AzureRmAccount, Disconnect-AzureRmAccount, Remove-AzureRmAccount or even Remove-AzureRmContext commandlets! That's a lot of fun :)

Oh no! PowerShell cached my Azure credentials and I messed up wrong customer’s environment!

Whoops. Could happen to anyone, since the Azure PowerShell since (approximately) version 6.3.0 will cache your credentials between sessions without warning you. It’s really easy to run your commands with cached accounts, and end up executing your scripts against the wrong environment. In less serious cases, this means that you’ll end up running commandlets twice against the test environment, while you think you’re running them first against test, and then production. In more serious cases, you’ll deploy your ARM templates or run your cleanup scripts against wrong…Continue reading Oh no! PowerShell cached my Azure credentials and I messed up wrong customer’s environment!

SOLVE ALL THE ERRORS!

Azure Functions failing on “OPTIONS” call? Quick fix!

I recently ran into an issue when developing Azure Functions locally. My SPFx webpart was configured to request information from my locally running Azure Function, but suddenly started ending up in error. Browser only showed 404 for the first request (OPTIONS) the SPFx webpart was sending – although I knew the function was up and running! So what to do? Posts Related to “Azure Functions failing on “OPTIONS” call? Quick fix!”:The Scary Anatomy of a Microsoft License FraudHow to remove Azure Functions without deleting the…Continue reading Azure Functions failing on “OPTIONS” call? Quick fix!

Azure Functions CLI - such a pretty logo for such an awesome functionality

Ignite 2018 recap: What’s new for Azure Functions?

Ignite 2018 is done and dusted, and it’s a good time to quickly recap what’s new for Azure Functions in the coming months. They’ve certainly been getting a lot of love from Microsoft, which is GREAT! New features for Azure Functions There was a bunch of exciting new things announced! Not all of the things in this blog post are necessarily completely new – but rather reached General Availability. Let’s go through them one by one… Posts Related to “Ignite 2018 recap: What’s new for…Continue reading Ignite 2018 recap: What’s new for Azure Functions?

The following functions are in error... And that's about it.

Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Let me start this article, by reminding everyone that Azure Functions are awesome, and you should use them despite some hiccups. Having said that, let’s fix some errors! In the beginning of September 2018, Microsoft started pushing out breaking changes to Azure Functions 2.x. They had announced this a full month in advance, so they expected everyone in the world to update their Azure Functions to avoid the functions from breaking. I guess, however, that in real life, a month is not that much. Me,…Continue reading Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Azure Functions SDK 2.0 settings in accessed in C# code

How to access Azure Function App’s settings from C#?

This article explains how you can access an Azure Function’s Application/Environment settings/variables from your C# code. Different versions of Azure Functions have different ways to access the Azure Function settings, but this page should explain the easiest way to get your application setting values for each Azure Functions version! While this is something I need often, it has been another little thing, that I always forget – so better document it somewhere. How to get application settings in different runtime versions of Azure Functions? This…Continue reading How to access Azure Function App’s settings from C#?

Azure Active Directory (Azure AD)

Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app

Another day, another Azure Active Directory error! So what’s this AADSTS70005 all about? While either developing or just trying to use an application that authenticates against Azure AD, you might get an error message that contains error code “AADSTS70005“. This means that you’re trying to use implicit authentication flow, but it isn’t allowed for your app. If you have access to the Azure AD you’re authentication against, it’s easy to fix! See more below… Reason You might get an error, somewhat like this: AADSTS70005: response_type ‘token’…Continue reading Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app