JSON Web Token .NET Core Demo

Lou Mauget .NET Core, C#, Programming, Technology Snapshot Leave a Comment

In this post, I present a tiny .NET Core C# JWT API demo that creates and parses a JSON Web Token (JWT). A self-contained Swagger UI dashboard exercises the API. 

We can’t dead-drop a JWT demo without wrapping it in words about JWT background. I’ll set the scene by introducing tokens, JWTs, and surveying session state residency tradeoffs. We’ll then migrate to, high-level JWT JWT use cases, and arguments about if or when to use JWTs. 

I seek to give equal coverage to JWT upsides and downsides. Let’s get started.

[Video] Azure Options For Enterprise: Pros, Cons & Use Cases

Keyhole Software .NET, Azure, Cloud, Keyhole, Service Fabric, Technology Snapshot, Tutorial, Video Leave a Comment

The Azure cloud platform is vast and it can be difficult to determine the best option given unique requirements. This video discusses six options within the wide world of Microsoft Azure including Virtual Machines (IaaS), App Services (PaaS), Function Apps (FaaS), AKS (KaaS), Logic Apps (?aaS), and Service Fabric (PaaS).

For each option, Keyhole Software Consultant Zach Gardner introduces the pros, cons, optimal use cases, and tips for success with each Azure approach based on his experience.

This 40-minute video was recorded in November 2019 at a Keyhole Software internal employee Lunch & Learn event featuring Keyhole Consultant Zach Gardner…

Integrating Azure Functions with Cosmos DB SQL API in .NET Core 2.2

Zach Gardner .NET Core, Azure, Technology Snapshot, Tutorial Leave a Comment

I am working on a project that leverages both Azure Functions as well as Cosmos DB. In trying to get both of these components wired together, I found that there are very few examples that work with the most recent versions of these components. I also saw examples that could work at a small scale, but don’t show industry-standard best practices, and would lead to performance issues if deployed in an environment with any meaningful traffic.

To that end, I put together this blog post showing how to set up an Azure Functions project in .NET Core 2.2 to integrate with Cosmos DB’s SQL API using its native tooling.

C# On The Client Side With Blazor

Clayton Terry .NET, CSS & HTML, Technology Snapshot Leave a Comment

With the introduction of .Net Core 3.0, Microsoft has built its own web UI framework.

Introducing Blazor: Microsoft’s fully C# client-side framework. With the help of its Razor platform, Microsoft is attempting to put its hat in the ring with the likes of Angular, React, and Vue.

Blazor allows developers to fully design and execute web pages purely with C# — it is meant to eliminate the need for JavaScript. The goal is also to hopefully limit the number of vulnerabilities found in front-end UI work.

In this post, we give an introduction to Blazor and a quick tutorial for getting started.

.NET Memory Management with dotMemory

Jason Schmidtlein .NET, .NET Core, Problem Solving, Technology Snapshot Leave a Comment

Given the maturity of the .NET Framework and the automated nature of its memory management, many developers are guilty of glossing over (or even outright ignoring) whether their code is optimal in terms of CPU and memory usage. Personally, I have caught myself making sure my code is maintainable, testable, and extendable while forgetting to consider memory management in terms of nonfunctional aspects.

While the .NET runtime does a great job and memory corruption is extremely rare, we should still be concerned with memory management, particularly in large-scale .NET base applications.

This concern isn’t limited to on-premise applications. It’s easy to forget about memory usage with cloud computing. Azure Functions and AWS Lambda have billing structures based upon the average memory size per second of function execution. The direct correlation between memory usage and cost couldn’t be more transparent.

Fortunately, there are many great tools to help profile and analyze your memory footprint. JetBrains has a fantastic tool called dotMemory which makes it easy to profile processes, auto detect issues, perform deep analysis, and determine traffic. dotMemory can be installed as either a stand-alone tool or as a part of the ReSharper package integrated into Visual Studio.

In this post, we’ll show how to use dotMemory to generate a memory profile and analyze a memory leak in a .NET Core application.