Categories

8 articles in ASP.NET Core
Securing an ASP.NET Website with OpenID Connect
The Microsoft ASP.NET middleware makes it straightforward to implement OAuth2 and OpenID Connect flows in an ASP.NET Website. In this article we will go through the code and configuration required to implement the authorization code flow using the standard packages. Please note this tutorial… 
How to Mock HttpRequestData for Unit Testing in Azure Functions
It turns out that unit testing Azure Function Http Triggers is not straightforward. In particular, isolated functions that use the Built-in HTTP model . The built-in model passes HttpRequestData to the Run method and returns a HttpResponseData object. As an example, consider a function that… 
Global Error Handling in ASP.NET Core 8 with IExceptionHandler
Typically in a ASP.NET Core Web application our code may throw an unhandled exception for many unknown reasons. Consequently its advisable to wrap application code in a global exception handler using a filter or some custom middleware. ASP.NET Core 8 introduces a new interface called… 
Using Serilog and .NET to Write Logs to Splunk HTTP Event Collector
Splunk provides an HTTP endpoint, known as an Event Collector, which can be used to POST log messages directly to the Splunk database. In this article we see how Serilog can be used in an ASP.NET Core Web API to write messages into Splunk using the HTTP Event Collector. In enterprise scenarios the… 
Displaying Data With ASP.NET Core and jQuery datatables.net
Software systems often have to display a lot of data and people expect functionality like pagination, searching and sorting by default. The jQuery plugin datatables.net transforms a basic HTML table with a few lines of code into a fully functional data grid. Its pretty awesome! A few lines of code… 
ASP.NET Core Data Driven Bootstrap Treeview
Bootstrap provides some nice, clean components for structuring page content. You can also combine various styles to create new effects. In this article we will see how to combine List Groups with the Collapse plugin to create a tree like representation of some hierarchical data: Bootstrap… 
Dockerize an ASP.NET Core Application
Visual Studio provides excellent support for docker containers, but this does mean some of the complexities of the technology can get masked. In this tutorial we walk through the basics of building a docker container for a simple ASP.NET Core Web Application so that we can better understand the… 
ASP.NET Core Razor Pages Simple Web Template
Visual Studio 2022 provides a template for creating an empty ASP.NET Core application. Although this template requires a bit of work to get a Razor Pages website up and running, by using the empty template we can include only the libraries and template code that we actually need. Before we begin, if…