Category Uncategorized

Running Razor Pages and a gRPC service in a single ASP.NET Core application

This article shows how ASP.NET Core Razor Pages can be run in the same application as a gRPC service. Code: Posts in this series Security Experiments with gRPC and ASP.NET Core 3.0 Running Razor Pages and a gRPC service in a single ASP.NET Core application Adding Razor Pages to an existing gRPC service This […]

Auto Generated .NET API Clients using NSwag and Swashbuckle Swagger

This article shows how auto generated code for a C# HTTP API client could be created using Swagger and NSwag . The API was created using ASP.NET Core MVC. Code Create the API using ASP.NET Core and Swashbuckle Swagger The API is created using ASP.NET Core with Swashbuckle. Add the required Nuget packages to […]

Passing Javascript values to ASP.NET Core View components

In this post, I show how an ASP.NET Core MVC view can send a Javascript parameter value to an ASP.NET Core view component. Invoking a view component in the view using ‘@await Component.InvokeAsync’ will not work, as this is rendered before the Javascript value has been created. Code: History 2019-01-24 Added an Anti-Forgery token […]

Using an OData Client with an ASP.NET Core API

The article shows how to implement an OData client from an ASP.NET Core application. Bearer token authorization is used to secure the API. Code: This blog is part 2 from this blog: Part 1: OData with ASP.NET Core Setting up the applications Three applications are used to implement this, the StsServerIdentity, which is the […]

OData with ASP.NET Core

This article explores how to setup an OData API with ASP.NET Core. The application uses Entity Framework Core with a database first approach using the adventureworks 2016 Microsoft SQL Database. Code: Part 2: Using an OData Client with an ASP.NET Core API Setting up the Database The adventureworks 2016 database from the Microsoft/sql-server-samples […]

Creating a PDF in ASP.NET Core using MigraDoc PDFSharp

This article shows how to use MigraDoc in ASP.NET Core to create PDF documents. In the last blog post, Creating a PDF in ASP.NET Core, PDFSharp was used to create the PDF. MigraDoc is used on top on this, which makes it easy to create tables and other document layouts. Code: Setting up the […]

Deploying an ASP.NET Core application to Windows IIS

This article explains how to deploy an ASP.NET Core application to a Windows hosted IIS Server. Most applications are now deployed to a cloud hosted solutions like Azure App Services, but sometimes it is required to deploy to an IIS. I ran into an number of issues, which weren’t very well documented, which surprised me […]