Roundup #69: ASP.NET Core Urls & Ports, Tye, Orleans, and Diagnostics

After a bit of a break, the .NET Roundups are back! This week, it’s almost as if Andrew Lock was working on the exact same I was as he had two posts back to back that solved two issues I was having. Incredible timing and as always great content from Andrew.

5 ways to set the URLs for an ASP.NET Core app

In this post I show 5 different ways to change which URLs your app listens on. We’ll look at each of these options in more detail below.

Link: https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/

How to automatically choose a free port in ASP.NET Core 3.0

In this post I show one way to resolve the problem by randomising the ports ASP.NET Core uses when it starts the application. I’ll also show how you can work out which port the application has selected from inside your app.

Link: https://andrewlock.net/how-to-automatically-choose-a-free-port-in-asp-net-core/

Service and Container Orchestration for .NET with Tye

Tye helps .NET Core developers build applications that are a collection of services and containers. On your local machine, Tye runs your .NET services, any containers you need, and a dashboard you can use to inspect this environment. Tye can then deploy your services and containers to your Kubernetes cluster.

Link: https://staffordwilliams.com/blog/2020/04/07/service-and-container-orchestration-for-dotnet-with-tye/

Project Orleans and the distributed database future with Dr. Philip Bernstein

Forty years ago, database research was an “exotic” field and, because of its business data processing reputation, was not considered intellectually interesting in academic circles. But that didn’t deter Dr. Philip Bernstein, now a Distinguished Scientist in MSR’s Data Management, Exploration and Mining group, and a pioneer in the field.

Today, Dr. Bernstein talks about his pioneering work in databases over the years and tells us all about Project Orleans, a distributed systems programming framework that makes life easier for programmers who aren’t distributed systems experts. He also talks about the future of database systems in a cloud scale world, and reveals where he finds his research sweet spot along the academic industrial spectrum.

Link: https://www.microsoft.com/en-us/research/blog/project-orleans-and-the-distributed-database-future-with-dr-philip-bernstein/

Introducing the Diagnostics Client Library for .NET Core

In this episode, we’re joined by Software Engineer Sung Yoon Whang from the .NET Runtime team. He’s here to talk to us about the diagnostics client .NET Core. Using the library, you can communicate with CoreCLR to gather diagnostics dumps from your running application.



Link: https://channel9.msdn.com/Shows/On-NET/Introducing-the-Diagnostics-Client-Library-for-NET-Core?WT.mc_id=ondotnet-twitter-cephilli

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #68: Binding Redirects, Combining Types as Effects to Describe an Application, Endpoint from multiple middleware, Clean Architecture

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Binding Redirects

You’re probably here because of an error like this:

Could not load file or assembly ‘System.<…>, Version=4.x.x.x, Culture=neutral, PublicKeyToken=<…>’ or one of its dependencies. The system cannot find the file specified.

And you likely saw a build warning like this:

warning MSB3277: Found conflicts between different versions of “System.<…>” that could not be resolved.

Whelp, you’re not alone. We’re thinking about starting a survivors group.

If someone starts a survivors group, I’m joining. I’ve spent a serious amount of time and head-scratching over binding redirects. Specifically around System.Net.Http. The answer in my case was using <AutoGenerateBindingRedirects>

Link: https://nickcraver.com/blog/2020/02/11/binding-redirects/

Combining Types as Effects to Describe an Application

I can only imagine the face I made the first time someone referred to the type of an application. Coming from a Delphi, .NET, and web background at the time, I assumed the type of an application was Web vs Desktop vs Command Line. What I came to understand was that types can be used to model effects which can then determine what your application does.

Reid pointed out this post he wrote after I posted the following tweet (and my typo of “ton”… oops). I highly recommend reading this as Reid points out something I’ve never really thought of before.

Link: https://medium.com/@reidev275/combining-types-as-effects-to-describe-an-application-5830a1c48c05

Creating an endpoint from multiple middleware in ASP.NET Core 3.x

In a recent post I discussed the changes to routing that come in ASP.NET Core 3.0, and how you can convert a “terminal” middleware to the new “endpoint” design. One question I’ve received is whether that removes the need for “branching” the pipeline, and if not, how can you achieve the same thing with endpoints?

This short post assumes that you’ve already read my post on converting a terminal middleware to endpoint routing, so if you haven’t already, take a look at that one first! I give a quick recap below, but I won’t go into details.

Link: https://andrewlock.net/creating-an-endpoint-from-multiple-middleware-in-aspnetcore-3/

The Clean Architecture – Ian Cooper

What is the clean architecture and how you would build one in .NET? Recently Bob Martin has categorized a set of architectures, including hexagonal architecture, onion architecture and screaming architecture as ‘the clean architecture’ – a layered architecture of concentric circles with a strong emphasis on separation of concerns. This architecture has become popular because of its amenability to modification as an evolutionary architecture and its support for practices such as TDD. In this presentation we will discuss the clean architecture and its benefits. More than that, in the bulk of the presentation, we will show you how to implement a clean architecture in .NET. From first steps to working code, we will show you the moves required to embrace this approach, and introduce you to some of the OSS libraries that can help you get there. All examples will be in .NET Core

Link: https://www.youtube.com/watch?v=SxJPQ5qXisw

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #67: Cert Expiration Check, Should I use MicroServices? StackOverflow Survey, gRPC-Web

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Certificate Expiration Check

I thought this was a pretty cool idea and an easy way to keep track of expiring certs.

Link: https://github.com/ardalis/CertExpirationCheck

Should I Use A Microservices Architecture?

Are you considering adopting a microservices architecture? Won’t it fix all your problems? Join me for a look into the realities of microservices!

Link: https://www.jamesmichaelhickey.com/microservices-architecture/

2020 Stack Overflow Developer Survey

Thank you for taking the 2020 Stack Overflow Developer Survey, the largest and most comprehensive survey of software developers (and anyone else who codes!) on Earth. 

Link: https://stackoverflow.az1.qualtrics.com/jfe/form/SV_eL0mFVwuo7KWeXP

A new experiment: Call .NET gRPC services from the browser with gRPC-Web

I’m excited to announce experimental support for gRPC-Web with .NET. gRPC-Web allows gRPC to be called from browser-based apps like JavaScript SPAs or Blazor WebAssembly apps.

gRPC-Web for .NET promises to bring many of gRPC’s great features to browser apps:

Strongly-typed code-generated clients
Compact Protobuf messages
Server streaming

Link: https://devblogs.microsoft.com/aspnet/grpc-web-experiment/

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.