Beginning gRPC with ASP.NET Core 6: Build Applications using ASP.NET Core Razor Pages, Angular, and Best Practices in .NET 6

My good friend Anthony Giretti, a Microsoft MVP in Developer Technologies has recently published his book “Beginning gRPC with ASP.NET Core 6″ and I wanted to share the news with the community.

About the book

Beginning gRPC with ASP.NET Core 6 is your guide to quickly and efficiently getting down to the business of building gRPC applications in the Microsoft .NET ecosystem. Readers will dive in and build an application using gRPC and the latest technologies such Angular and ASP.NET Core Razor Pages. 

This book will teach you how to set up an efficient application using industry best practices such as security, monitoring, logging, testing, and more. You will do this by performing Create, Read, Update, and Delete (CRUD) operations on a SQL Server database with Entity Framework Core. From there you will build web applications using Angular and ASP.NET Core Razor pages combined with gRPC APIs.After reading the book, you’ll be able to take advantage of the full range of developer opportunities with gRPC, and come away with any understanding of which usage scenarios are best suited for your projects. And you will possess a solid understanding of the best way to build APIs with ASP.NET Core.

What You Will Learn

  • Benefit from a new way to design APIs
  • Build modern web applications
  • Migrate easily from WCF to gRPC
  • Become comfortable with latest industry programming standards

Pre-order it now from Amazon.



Highlights from Microsoft Build 2021 | Digital Event

I’m happy to announce a Highlights from Microsoft Build 2021 digital event next Thursday, July 15. Please join me and other local experts as we look to provide key insights from the event that will help you expand your skillset, find technical solutions, and innovate for the challenges of tomorrow.

Here are the topics that will be covered:

  • .NET 6 and ASP.NET Core 6 and C#10
  • Internet of Things
  • DevOps
  • Kubernetes
  • Power Platform
  • Artificial Intelligence
  • Azure Functions
  • Entity Framework
  • Power BI

For more details about this event, please visit https://www.meetup.com/CTTDNUG/events/279130746/



Discover the world of .NET – .NET Conf 2018

Discover the world of .NET for free this September 12-14, 2018 by attending the .NET Conf virtual developer event, which is co-organized by Microsoft and the .NET community. Over the course of the three days, you will have a wide selection of live sessions from .NET community and the .NET product teams. This is a great chance for you to learn, ask questions and get inspired for your next great project.

You will learn to build for web, mobile, desktop, games, services, libraries and more for a variety of platforms and devices all with .NET. We have sessions for everyone, no matter if you are just beginning or are a seasoned engineer. We’ll have presentations on .NET Core and ASP.NET Core, C#, F#, Azure, Visual Studio, Xamarin, and much more.

Join your fellow developers in a city near you, and learn more about the world of .NET, Azure, and Xamarin. To watch the sessions from last year, take a look at the 2017 sessions on demand from Channel 9.


Day 1 – September 12

8:00 – 9:30
Keynote broadcasted from Microsoft Channel 9 Studios

9:30 – 17:00
Sessions broadcasted from Microsoft Channel 9 Studios

17:00 – 18:30
Virtual Attendee Party! Engage with our partners on Twitter and win prizes!

Day 2 – September 13

9:00 – 17:00
Sessions broadcasted from Microsoft Channel 9 Studios

17:00 – 23:59
Community Sessions in local languages & time zones around the world

Day 3 – September 14

0:00 – 17:00
Community Sessions in local languages & time zones around the world

All times listed are in Pacific Daylight Time (UTC -7).

Attend a Local .NET Conf

In addition to the three day virtual event being held from September 12-14, there will also be some local events you can attend. Take a look at this page for locations and to register. In Canada we will have 2 local events in Vancouver BC and Mississauga ON.

September 26, 2018
Vancouver, BC, Canada
Register Here

October 25, 2018
Mississauga, Ontario, Canada
Register Here

Run your own local event

If you’re interested in running your own .NET Conf take a look at this link for details.







Getting Started with Application Insights for ASP.NET Core

In my previous posts I gave a quick Introduction to Application Insights and then I showed you how to Disable Application Insights from your app. In this post I’ll walk you through creating an ASP.NET Core application and then configuring it with Application Insights. Let’s get started.

Configuring your app for Application Insights

Start by creating a new ASP.NET Core application (this also applied to non-core ASP.NET applications). Once the application is created right click on the project file in the context menu look for Configure Application Insights… and then click on it.


You will see that the SDK has already been added to your application. Next click on the Start Free button to start using Application Insights.


You will need to have an existing Azure Subscription. If you don’t already have one you can create one for free and start with a $250 credit for 30 days + you will have access to popular services for 12 months + there are over 25 services that are always free. Now that you have your Azure Subscription, login with your Microsoft Account, select your Subscription and then a Resource. These can always be easily changed later on if need be.

You will now have access to the free plan which comes with 1 GB / Month of data included and data retention is 90 days. Click on he Register button to finish the configuration:


Now that Application Insights is configured for your application you have access to a wealth of information with the click of a button.


Accessing the Application Insights Telemetry from Visual Studio

You can search your Application Insights results from either the Azure Portal or from within Visual Studio. To use Visual Studio go to the View menu, select Other Windows and then Application Insight Search. You will then get view of the telemetry for the last 24 hours as shown below from a sample API I have. From here you can filter the telemetry and dive down into specific events.


Another nice feature is that Application Insights telemetry data including any exceptions that have been captured will show up in the CodeLens information as shown here:


There is a lot of value from using Application Insights in any of your applications. I hope you take a look and try it out for yourself.






How to Disable Azure Application Insights in ASP.NET Core

In my previous post I showed you how easy it was to get started with an Introduction to Application Insights for your ASP.NET Core application. However what if you you don’t want Application Insights? You might notice in your Output pane when running your app that it’s still partially enabled for you out of the box. I’ll walk you through what I mean by it being partially enabled and then how you can go about hiding it until such time you decide to fully turn it on. Let’s get started.

Start off by creating a new ASP.NET Core application (see below) and then immediately run it.


You will then notice that you will see the following statements in your Output pane:

Application Insights Telemetry (unconfigured): {“name”:”Microsoft.ApplicationInsights.Dev.Message”,”time”:”2018-03-24T03:39:26.5327026Z”,”tags”:{“ai.application.ver”:”″,”ai.operation.parentId”:”|80d77757-4707b4b80d71a9b3.”,”ai.internal.sdkVersion”:”aspnet5c:2.1.1″,”ai.operation.id”:”80d77757-4707b4b80d71a9b3″,”ai.internal.nodeName”:”LT2206″,”ai.location.ip”:”″,”ai.cloud.roleInstance”:”LT2206″,”ai.operation.name”:”GET Values/Get”,”ai.user.id”:”6RWa2″},”data”:{“baseType”:”MessageData”,”baseData”:{“ver”:2,”message”:”Executed action WebApplication5.Controllers.ValuesController.Get (WebApplication5) in 205.1085ms”,”severityLevel”:”Information”,”properties”:{“DeveloperMode”:”true”,”{OriginalFormat}”:”Executed action {ActionName} in {ElapsedMilliseconds}ms”,”ActionName”:”WebApplication5.Controllers.ValuesController.Get (WebApplication5)”,”AspNetCoreEnvironment”:”Development”,”ElapsedMilliseconds”:”205.1085″,”CategoryName”:”Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker”}}}}


You might be wondering why is it doing this and how can I disable it?

The easiest way to disable Application Insights without going through the process of ripping it out is to just disable it. You can do this by accessing TelemetryConfiguration.Active.DisableTelemetry and setting this to true. What I would recommend doing is to add a static method to your Startup.cs file and call this method from your Configure method like so:


Now when you run your application and look in the Output pane you will no longer see any statement pertaining to Application Insights.


I see a great deal of value of keeping Application Insights and using it in all your applications, so if you need to disable it then maybe do this when running in debug mode by using a conditional attribute on the method.





ASP.NET 5 Overview

ASP.NET 5 is a significant redesign. Checkout the overview on the ASP.NET site.

“ASP.NET 5 is a lean .NET stack for building modern web apps. We built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions.”




Announcing .NET 2015 Preview: A New Era for .NET

“Today is a pivotal moment for .NET. With the release of .NET 2015 Preview, we are embarking on a new journey while maintaining our strong commitment to the 1+ billion customers that are using .NET today.

As Scott Guthrie and S. ‘Soma’ Somesegar announced at the Connect(); event today, .NET is entering a new era as it embraces open source as a core principal and enables .NET applications to run on multiple operating systems. As part of .NET 2015 Preview, we are delivering .NET Core 5 which is a completely open source stack and can run on multiple operating systems. In addition, not only are we contributing .NET Core 5 to the .NET Foundation but we will openly collaborate with the community and ensure that we continue our strong relationship with existing .NET open source communities, in particular the Mono community. Here are a set of announcement around open source and cross platform from today’s Connect(); event:

.NET Core 5 is the small optimized runtime for ASP.NET 5. It currently runs on Windows, and will be extended to Linux and Mac. You will have more choice of which operating systems you use for ASP.NET 5 development and deployment, supported by Microsoft. Azure will support ASP.NET 5 in both Linux and Windows VMs. You choose.”




How to get your ASP.NET application working in IE11

Excellent post on Telerik blog on how to update your server to recognize IE11:




Windows Azure Web Sites: How Application Strings and Connection Strings Work

Great article on how Windows Azure Web Sites: How Application Strings and Connection Strings Work.

Windows Azure Web Sites has a handy capability whereby developers can store key-value string pairs in Azure as part of the configuration information associated with a website.  At runtime, Windows Azure Web Sites automatically retrieves these values for you and makes them available to code running in your website.  Developers can store plain vanilla key-value pairs as well as key-value pairs that will be used as connection strings.

Since the key-value pairs are stored behind the scenes in the Windows Azure Web Sites configuration store, the key-value pairs don’t need to be stored in the file content of your web application.  From a security perspective that is a nice side benefit since sensitive information such as Sql connection strings with passwords never show up as cleartext in a web.config or php.ini file.




Visual Studio 2012 Now Available


Today Microsoft has made Visual Studio 2012 and all it’s related products available to download. You should note that with the 2012 edition, Team Foundation Server Express is available. Sweet!

Download and try it today

Attend the launch event on September 12