Migrating ASP.NET Web API services to Azure

As part of our continued process improvement we’ve been making increasing use of Microsoft’s Azure platform. Recently I began using their Application Insights for collecting metrics from our ASP.NET Web API services. I have configured this to collect metrics for both our on-premise development and staging applications, as well as our cloud based production application.

More recently I have now fully migrated our ASP.NET Web API production services to Azure. This entailed making changes to the way the current logging functionality worked. The logging was a file-based mechanism where all logging was written to files on the server. This obviously needed changing to work in the cloud, so I re-wrote the entire logging process so as to use an Azure SQL table instead.

In fact, by adding firewall rules on the Azure database, you can open the Azure database in your local SQL Server Management Studio. This allows us to use the Azure logging process for our on-premise development and staging builds and releases too. So our entire CI / CD pipeline is now able to use the Azure logging process. This has significantly reduced the burden on our local infrastructure, not to mention improving the scalability and efficiency of our applications too by using vastly superior cloud infrastructure.

The goal is to migrate all our RESTful services and associated infrastructure to Azure, or at least as far as is reasonably practicable. For our next project where we will be expanding the services offered against our mobile apps, we’ll implement further services and continue to host these on Azure.

A father, cyclist, vegetarian, atheist, geek and multiple award winning technical author. Loves real ale, fine wine and good music. All round decent chap.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store