Upgrading to WebJobs SDK 3.0

With the recent release of Azure Functions Runtime 2.0, WebJobs SDK 3.0 got released alongside. WebJobs SDK is the backbone of Azure Functions, however it can be also used standalone to power Azure WebJobs which you can host alongside your App Service. SDK 3.0 brings the configuration much closer to ASP.NET Core, runs under both .NET Framework and .NET Core and for example supports Dependency Injection by default.

Continue reading “Upgrading to WebJobs SDK 3.0”

UseHttpsRedirection on Azure App Service

Recently, when deploying a project, we have hit an interesting issue – when we deployed an ASP.NET Core 2.1 application with HTTPS redirection middleware with HSTS middleware disabled, however the redirection wasn’t working correctly.

Continue reading “UseHttpsRedirection on Azure App Service”

Working with certificates in Azure App Service

Recently, we had a project which required us to connect to a MySQL server from .NET Core with a client certificate authentication. While this seemed fairly trivial, we have hit some issues after deploying the application to Azure App Service.

Read more

Including front-end libraries in ASP.NET Core projects

I have been recently working on an internal project which allows people to authenticate into a Wi-Fi with Azure AD and other various methods through a captive portal. While trying to maintain a strict policy on what hostnames can be accessed (basically just allowing Azure AD endpoint’s and the application server) I noticed that the default ASP.NET Core project setup seems to set a bad example in handling JavaScript libraries in your project.

Continue reading “Including front-end libraries in ASP.NET Core projects”

Deploying ASP.NET Core to App Service on Linux

When you attempt to deploy an ASP.NET Core project to App Service on Linux, you may run into an error during the build process – Object reference not set to an instance of an object. When you try to deploy the project to App Service on Windows, everything works, so where is the issue?

Continue reading “Deploying ASP.NET Core to App Service on Linux”

Deploying PHP web applications to Azure App Service

In this article we are going to take a look at options on how to deploy a standard PHP application to Azure App Service. This article is split into two parts – classical App Service running Windows and the new Docker-based App Service on Linux which recently got some really nice improvements towards PHP support.

Continue reading “Deploying PHP web applications to Azure App Service”

Deploying ASP.NET Core along with a WebJob to App Service

Recently I have been working on a project in ASP.NET Core and DotVVM accompanied by a WebJob using Azure WebJob SDK. The idea behind publishing was that whenever I push code to the repository (VSTS in my case), App Service would pull the code, build it and deploy it automatically (this is achieved by setting up Continuous Deployment). This method works just great for ASP.NET Core application, however when accompanied by a WebJob, things weren’t as smooth as I was expecting them to be.

Continue reading “Deploying ASP.NET Core along with a WebJob to App Service”

Configuring curl.cainfo in PHP on Azure App Service

cURL is one of the most common ways to make HTTP requests from PHP code. When you make regular http:// calls everything is alright, but when you decide to go with https://, you need to configure few things on App Service manually for it to work correctly.

Continue reading “Configuring curl.cainfo in PHP on Azure App Service”

Speed up your application in Azure App Service

There are many different articles on the internet about how to make an application faster when hosting it on Azure. This has been a real pain point with big PHP applications or applications which involve a lot if IO operations – like loading modules with Node.js. Recently, I was working with one startup and they approached me with a very interesting issue: Their Node.js application was running about 35x faster on Heroku than on Azure App Service and that is what actually made me to write this article.

Continue reading “Speed up your application in Azure App Service”

Session locking in PHP on Azure Web Apps

During the last couple of weeks, users started noticing certain issues with an application that I develop on Microsoft Azure using PHP and Azure Web Apps. In general, the application is using an OAuth2 library to connect to a custom identity provider, the access token, refresh token and others are stored in $_SESSION. From the last sentence, you could have noticed two keywords – OAuth2 and refresh. The users started noticing an issue that after some time of working with the application (also the IdP was generating loads of useless token pairs), that they had to constantly relog. After turning on the logs, doing some diagnostics and trying to reproduce the issue, it was pretty clear – something fishy is going on with sessions.

Continue reading “Session locking in PHP on Azure Web Apps”