Easy Thumbnail Images with Azure Functions and CloudConvert
Have you ever built an application that needed to generate and display thumbnail images? Thumbnail images for any type of image: PNG, JPG, GIF, HEIC, HEIF, SVG… And not just thumbnails for image files but for PDFs, documents, and other random files that users may throw at it? Unless you are building a very custom […]
Migrating Your Legacy ASP.NET Projects to ASP.NET Core Incrementally with YARP
Many C# and .NET developers are grappling with aging ASP.NET projects still running on the .NET Framework. If that’s you, you’re not alone. Many of us have invested heavily in these applications, so the prospect of a full-scale upgrade can seem overwhelming. You might have your eye on moving to ASP.NET Core with its array […]
Exploring What’s New in .NET 8
In the early days of the .NET Framework, releases were infrequent and timed with Windows releases. The shift to an open-source platform brought a welcome change. Now, we anticipate an annual .NET release tied to the .NET Conf event every November. Building on the foundation of .NET 7, this release introduces a host of new […]
Trailhead Interviewed on The Azure DevOps Podcast
In the quickly evolving landscape of software, keeping pace with advancements is crucial to avoid having your application become a dreaded “legacy” application. Recently, Trailhead’s very own Jonathan “J.” Tower had the privilege of being a featured guest on The Azure DevOps Podcast with Jeffrey Palermo. During this insightful conversation, J. and Jeffrey discussed the […]
Slow .NET API? Redis Caching May Be the Answer
Just like venturing into the wilderness requires the proper gear, developing REST APIs with ASP.NET Core also requires the right tools and equipment for your application to perform at its best. At Trailhead, Redis caching is one such tool that’s always in our backpack. What Is Redis? Redis is an open-source, in-memory data store that […]
SignalR Scaling with Azure SignalR Service
SignalR is the best way to enable real-time communication in modern .NET web applications. So let’s say you have built your first app with SignalR, deployed it to Azure, and everything is working great. After seeing a huge influx of new users, you decide to scale out your App Service to add another instance to […]
Migrate from .NET Framework to .NET 5
.NET 5 has been available for some time now and .NET 6 will be released in late 2021, but perhaps your team is still using .NET Framework 4.7 or 4.8. You may have preferred to stick with what your team knows, or with the time-tested platform that has been around for decades, but .NET 5 […]
Calling APIs with OAuth2 Access Tokens – The Easy Way!
Scenario: Your API needs to call another REST API – or your Console App or Web Job needs to call some other REST API. You can acquire an access token to that API from an OAuth2 Security Token Service such as Duende Identity Server, Okta, Auth0 or Azure Active Directory. This blog shows you how […]
Creating PDF Documents with Razor in ASP.NET Core 2.2 Web API
In this article, I will show you an easy way to create a PDF document and style it properly with Razor engine and the DinkToPdf library. The source code of this project can be found on GitHub. Setting up the project For simplicity, we will create a default Web API project with default options that […]
Breaking change in AspNetCore 2.2 for SignalR and CORS
To get authenticated SignalR hubs to work, you need to allow credentials in CORS, so your aspnetcore code might look like this: services.AddCors(action => action.AddPolicy(policyName, builder => builder .AllowAnyMethod() .AllowAnyHeader() .AllowAnyOrigin() .AllowCredentials())); As of 2.2. you can no longer combine AllowAnyOrigin and AllowCredentials! You will see a warning in the debug output: warn: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[11] The […]