Assembly version tag helper for ASP.NET Core
I’m writing some web applications where I must show assembly version in footer of all pages. Applications are published online through Azure DevOps release pipelines and I’m using automatic date based versioning for assemblies. Here is how to show application version using assembly version tag helper.
Using query tags with Entity Framework Core 2.2
Entity Framework 2.2 introduces query tags that make it easier to find specific queries from logs and output windows of Visual Studio. When running application on development box it’s possible to live without query tags. We can set breakpoints to see SQL generated from LINQ queries. But how to find queries from log files in multi-threaded or multi-user scenarios?
Hosting WordPress on Azure
Another day, another disaster with shared hosting. And not this usual gateway-is-down-problem when people are visiting my blog. I started my journey with simple idea – why not WordPress on Azure? After some experiments I got my first results and the picture wasn’t as terrible pricewise as I thought. Here’s my first experiment with WordPress on Azure.
Lightweight custom authentication with ASP.NET Core
ASP.NET Core Identity is popular choice when web application needs authentication. It supports local accounts with username and password but also social ID-s like Facebook, Twitter, Microsoft Account etc. But what if ASP.NET Core Identity is too much for us and we need something smaller? What if requirements make it impossible to use it? Here’s my lightweight solution for custom authentication in ASP.NET Core.
Serializing objects to URL encoded form data
While messing with dictionaries to create form data for FormUrlEncodedContent so I can send data to server using HTTP client, I started thinking about easier and cleaner way to do it. I was writing integration tests and I wanted to re-use some model classes instead of dictionaries. Here’s how to do it. Sample of integration test is incluced.
Writing to CSV-file from multiple threads
I was writing document and metadata exporter that reads data from SharePoint and writes it to multiple files. I needed to boost up performance of my exporter and I went with multiple threads pumping out the data from SharePoint. One problem I faced – writing metadata to CSV-files from multiple threads in parallel. This blog post shows how to do it using concurrent queue.
What’s new in next version of Microsoft Edge
Next version of Microsoft Edge browser is replacing its current rendering engine and in future it will run on Chromium – the same rendering engine used by Google Chrome browser. Edge gets total rework and ends one era in Microsoft history on browsers field. With new browser there will come interesting new features. Here is overview of insiders release of next Microsoft Edge.
Using ASP.NET Core Identity user accounts in integration tests
I have application that uses ASP.NET Core Identity with classic logins and there’s need to cover this application with integration tests. Some tests are for anonymous users and others for authenticated users. This blog post shows how to set selectively set authenticated ASP.NET Core Identity user for ASP.NET Core integration tests.
Using custom startup class with ASP.NET Core integration tests
My previous post demonstrated how to use custom appsettings.js file with integration tests in ASP.NET Core. But in practice it’s not enough and very often we need custom startup class that extends the one in web application project to configure application for integration tests. This blog post shows how to do it.