Microsoft Azure
Articles
Debug - Azure Functions Flex Consumption Plan - Attach File Share via SMB
Azure CLI: RuntimeError: The content for this response was already consumed
When using Azure CLI az command to deploy Bicep or ARM templates to Azure, you may encounter the above issue. This article shows you how to find out the root cause.
Mount Azure File Share to Azure App Service or Azure Functions Linux Container Apps
This code snippet shows you how to mount Azure Storage file share as a local drive in a Linux container app hosted in Azure App Service or Azure Functions. Outline of the code The code snippet does the following: Create a storage account Create file service Create a file share Create an App Service resource with Linux container Mount the file share to the app For .NET 8 containers If you use .NET 8 images that runs without root permissions, please mount the file share to path under /home. Otherwise, you may encounter errors like the following when deploying to Azure: "message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"DeploymentFailed","target":"/subscriptions/\\\/resourceGroups/\\\/providers/Microsoft.Resources/deployments/kontext-web","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"InternalServerError","message":"There was an unexpected InternalServerError. Please try again later. x-ms-correlation-request-id: \\\*"}
Azure Function App - Failed to start a new language worker for runtime: dotnet-isolated
Deploy Azure Function App with .NET 8 to Azure Container Apps via Bicep
Azure Function App can now be deployed into Azure Container Apps managed environment. This code snippet shows you how to deploy an Azure Function App created with .NET 8 (dotnet-isolated as runtime) into a managed environment of Azure Container Apps. The container source image is from GitHub (ghcr.io). You can also use any other container registry. Resources created This Bicep template creates the following resources: Blob Storage account Azure Log Analytics workspace Azure Application Insights Azure Container Apps managed environment Azure Function App Required credential You need to provide a container registry user name and password if you are using private registry. This template uses GitHub Packages.
Creating Azure Function App with .NET 8 - Bicep Example
.NET 8 preview 7 is now supported for Azure Functions Linux consumption plan when creating dotnet-isolated function app. This code snippet shows you how to create a Function App using .NET 8. The key part is to change linuxFxVersion to 'DOTNET-ISOLATED|8.0'.
Retrieve Client IP Address in Azure Container Apps with HTTP Ingress
Use Bicep to deploy Azure Container Apps with a free managed certificate
Context A few weeks ago when I was migrating Kontext from Azure App Services to Azure Container Apps, there was no free managed certificate. To address that issue, I used Let's Encrypt to create a certificate for Kontext. This process will take me a few minutes every few months . Now good news is that free managed certificate is also in preview in Azure Container Apps. The following code snippet shows you how to do that in Bicep. Note: \* when I deploy using Bicep, my container app was already existing. This means the domain verification is already added to my Azure DNS zones. If you are building a new app using managed certificate, I would suggest you do it in two steps: Bicep code to create container app enivronment, container and DNS records (incl. A record that points to IP of your container app and/or asuid verification TXT record). And then update Bicep code to add managed certificate and custom domains. In custom domains, you can reference the managed certificate ID directly. And then deploy Bicep code again with delta changes. \* The container image is from GitHub (not Azure Container Registry) in the following example. Issues When I run the deployments, Azure throws out one interim error like the following (however the deployment itself was not failing): The client 'XXX' with object id 'XXX' does not have authorization to perform action 'Microsoft.App/locations/managedCertificateOperationStatuses/read' over scope '/subscriptions/XXX/providers/Microsoft.App/locations/Australia East/managedCertificateOperationStatuses/XXX' or the scope is invalid. If access was recently granted, please refresh your credentials. (Code: AuthorizationFailed) After I wait for about 10 minutes the deployment becomes successful as the following screenshot does: !2023061092538-image.png References Custom domain names and bring your own certificates in Azure Container Apps Microsoft.App managedEnvironments/managedCertificates 2022-11-01-preview
GitHub Actions: Update Azure Container Apps Environment Variables
GitHub Actions provides action azure/container-apps-deploy-action to deploy built container into Azure Container Apps. This action's attribute environmentVariables can be used to replace the existing variables. If you only want to update some variables, we can use Azure CLI commands. References https://github.com/Azure/container-apps-deploy-action
Error: Muliple files found matching pattern ./*.sql
Github Action Az Automation PowerShell: Object reference not set to an instance of an object
Azure Bicep - Allow Azure services and resources to access this resource
Azure Bicep Deploy Error - The 'parameters.properties.storageAccountSubscriptionId' segment in the url is invalid.
Fix Azure CLI Installer Error on Windows
Utilize HOME and TEMP/TMP Folders in Azure App Services
Azure.RequestFailedException: The value for one of the HTTP headers is not in the correct format
Could not get the latest source version for repository *** hosted on Azure Repos using ref ***
Execute Azure SQL Statements Periodically via Azure Automation
Azure Automation Account Runbooks
Azure PowerShell Runbook Error - Internet Explorer engine is not available
.NET 6 Azure Functions Isolated: An error occurred while loading required library hostpolicy.dll
Azure DevOps - Configure Web or Function App Settings
Azure Functions: Timeout value of 00:05:00 exceeded by function
Azure Blob Storage - This request is not authorized to perform this operation.
Build Azure Functions V4 with .NET 6
Port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]
Azure DevOps - Configure Connection Strings for Azure Function App
Use Entity Framework in .NET 5 Azure Functions
Dependency Injection and Use appsettings.json in .NET 5 Azure Functions
Create Blob Triggered Azure Functions using .NET 5
Fix .NET 5 Azure Functions Build Error on Azure DevOps
Resolve - Azure Function App Publish Specific Target Not Existing in VS2019
How to Create User for Azure SQL Database
Export CSV File from Azure SQL Databases
Create Virtual Network for Azure App Services and Azure SQL Database
EntityFramework Core Database Migration in Azure DevOps Pipeline
Configure Azure Blob Storage as Application Log Storage
Run .NET 5 on Azure App Services
Modern Web Application - Azure Blob Storage for Uploaded Files
With cloud platforms like Azure, we can totally separate user content storage from web application storage to decouple components from each other and to make the application easy to scale and deploy. This article provides detailed information with code snippets about how to use Azure server-less product Blob Storage and App Service to enable horizontally scalable web application for users to upload files (BLOBs).
Azure SQL Database Automated Backup Strategy
How to install and setup Let's Encrypt on Azure Web Apps
Access Artifact BuildNumber in Azure DevOps Release Pipeline
It might be useful to push artifact or build variables to your Azure websites environment variables in Release pipelines.
Advanced analytics on big data with Azure - Tutorial
Diagrams
Forwarded Headers for ASP.NET Core Apps on Azure Container Apps
This diagram shows a scenario that ASP.NET Core application is hosted in Azure Container Apps and listens on HTTP port 8080 while Azure Container Apps ingress is configured with HTTPS. The original request protocol HTTPS is lost but the forward header X-Forwarded-Proto has value HTTPS that can be used by ASP.NET Core applications to generate the right URL with HTTPS protocol.
Kontext Architecture 2023 on Azure
This diagram shows how Kontext is designed and built with Azure and GitHub products. It only shows the core products used and some other products are not included in the diagram. For example, Azure Automation Account for batch data calculations and updates. Notes: Common Services are used by most of the layers. Azure Functions are commonly used for asynchronous actions. Azure Container Apps are used to host the ASP.NET Core application & APIs.