Static Web Apps CLI: local authentication emulation with ASP.NETThe Static Web Apps CLI has a local authentication emulator. This is a useful tool for local development, and can be used with ASP.NET authentication. This post shows how.John Reilly·Mar 29·12 min readFollowazure static web appsnode.jsasp.netstatic web apps cli
Using Kernel Memory to Chunk Documents into Azure AI SearchTo build RAG (Retrieval Augmented Generation) experiences, where LLMs can query documents, you need a strategy to chunk those documents. Kernel Memory supports this.John Reilly·Apr 21·8 min readFollowazurec#asp.netai
Generate a Word document in ASP.NETLearn how to generate a Word document using the Open XML library in ASP.NET.John Reilly·Mar 19·2 min readFollowasp.net
Snapshot log tests in .NETThis post demonstrates how to write high quality and low effort log assertions using snapshot testing.John Reilly·Dec 20·6 min readFollowasp.netc#automated testing
Graph API: getting users Active Directory group names and ids with the C# SDKLearn how to get the Azure Active Directory group names and ids from the Graph API using the C# SDK.John Reilly·Nov 23·6 min readFollowauthazurec#asp.net
Azure Container Apps, Easy Auth and .NET authenticationAzure Container Apps support Easy Auth. However, .NET applications run in ACAs do not recognise Easy Auth authentication. This post explains the issue and solves it.John Reilly·Jun 11·6 min readFollowazureazure container appseasy authasp.net
ESLint your C# in VS Code with Roslyn AnalyzersESLint provides linting for TypeScript and JavaScript in VS Code. A similar experience is available for C# in VS Code through Roslyn Analyzers.John Reilly·Apr 6·7 min readFollowc#vs codejavascriptasp.net
Azure DevOps: consume a private artifact feedTo build applications both locally and in an Azure Pipeline using Private Azure Artifact feeds with Azure DevOps, follow these steps.John Reilly·Mar 30·3 min readFollowazure devopsasp.net
Swashbuckle & inheritance: Give. Me. The. TypesFor API endpoints that return multiple types, you can use inheritance with Swashbuckle to get create a Swagger / Open API definition; here is how.John Reilly·Mar 6·4 min readFollowswaggerasp.net
Directory.Build.props: C# 9 for all your projectsLearn how to use C# 9 with .NET Core by creating a `Directory.Build.props` file. All projects in the solution will support C#9 with no further steps.John Reilly·Jul 14·2 min readFollowc#asp.net
C# 9 in-process Azure FunctionsLearn to use C# 9 with .NET Core 3.1 Azure Functions in this step-by-step guide by adding new elements to your .csproj file.John Reilly·Jul 1·4 min readFollowc#azure functionsasp.net
Azure Functions and .NET 5: Query params, Dependency Injection, Bicep & BuildThe upgrade of Azure Functions from .NET Core 3.1 to .NET 5 is significant. This post shows part of the upgrade: Query params, Dependency Injection, Bicep & BuildJohn Reilly·Jun 11·3 min readFollowazure functionsbicepasp.net
Goodbye Client Affinity, Hello Data Protection with AzureHow to use ASP.NET Data Protection to remove the need for sticky sessions with Client AffinityJohn Reilly·Feb 27·4 min readFollowazureasp.neteasy auth
Making Easy Auth tokens survive releases on Linux Azure App ServiceTo prevent authentication issues during restarts or deployments, Microsoft is recommending Blob Storage for Token Cache to store and fetch tokens.John Reilly·Feb 16·4 min readFollowazureasp.neteasy authauth
ASP.NET, Serilog and Application InsightsLearn how to integrate Serilog into Azures Application Insights for better diagnostic logging by following these steps and adding dependencies.John Reilly·Jan 30·3 min readFollowazureasp.net
Azure App Service, Easy Auth and Roles with .NET and Microsoft.Identity.WebThe `Microsoft.Identity.Web` library has authorization issues with roles. A `IClaimsTransformation` can map claims to fix the problem.John Reilly·Jan 17·2 min readFollowazureasp.neteasy authauth
Make Microsoft.Identity.Web respond with 403 forbidden instead of a 302 redirectThe `Microsoft.Identity.Web` library redirects to AccessDenied with a 302 (redirect) status code. Learn to return a 403 (forbidden) status code instead.John Reilly·Dec 21·3 min readFollowasp.netazure
Autofac 6, integration tests and .NET generic hostingIntegration tests using Autofac have been affected by a long-standing issue in .NET Core 3.0. Alternative approaches may not last long.John Reilly·Oct 2·2 min readFollowasp.netautomated testing
Autofac, WebApplicationFactory and integration testsA bug in ASP.NET Core v3.0 thwarts swapping in Autofac as an IOC container in WebApplicationFactory tests. A workaround exists.John Reilly·May 21·3 min readFollowasp.netautomated testing
Up to the clouds!Migrating ASP.NET Core app from on-prem to cloud with Kubernetes, Docker, Jenkins, Vault & Azure AD Single Sign-On for greater efficiency.John Reilly·Apr 4·11 min readFollowasp.net
Dual boot authentication with ASP.NETThe article explains how to have different authentication methods for two classes of users accessing an app. Code snippets are provided.John Reilly·Mar 22·6 min readFollowasp.netauthazure
ASP.NET Core authentication: hard-coding a claim in developmentThe DevelopmentModeAuthenticationHandler allows ASP.NET Core developers to hard code user authentication claims during development, easing testing.John Reilly·Aug 2·3 min readFollowasp.netauth
Google Analytics API and ASP.Net CoreAccessing Google Analytics API from ASP.Net Core can be tough due to lack of examples. This article provides an example code to get page access stats.John Reilly·Mar 22·1 min readFollowasp.net
ASP.NET Core: Proxying HTTP Requests with an AllowListASP.NET Core can proxy HTTP requests selectively, allowing only acceptable traffic via a middleware for specified paths.John Reilly·Feb 22·4 min readFollowasp.net
IMemoryCache and GetOrCreateForTimeSpanAsyncIMemoryCache is a tremendous caching mechanism for .NET. This post demonstrates how to write a helper to allow you to get or create an item for a given TimeSpan.John Reilly·Dec 10·2 min readFollowasp.net
Using Reflection to Identify Unwanted DependenciesLearn how to identify unwelcome dependencies in complex web apps by walking a dependency tree using reflection-based tests.John Reilly·Apr 28·2 min readFollowasp.net
Auth0, TypeScript and ASP.NET CoreAuth0 makes authentication and authorization simple. They offer Auth-As-A-Service, quick start and easy customization of settings.John Reilly·Jan 14·7 min readFollowreactasp.netauthtypescript
Setting Build Version Using AppVeyor and ASP.Net CoreAppVeyor doesnt have support for setting version of a binary in dot net core, but it can be done easily through PowerShell.John Reilly·Apr 25·1 min readFollowasp.net
Debugging ASP.Net Core in VS or CodeLearn how John became a fan of VS Code for TypeScript and how they managed to debug ASP.Net Core using the extension for C#.John Reilly·Mar 28·3 min readFollowvs codevisual studioasp.net
Instant Stubs with JSON.Net (just add hot water)A utility class can create stubs to test an untested system with complex I/O. Serializing complex data to JSON files eases the process.John Reilly·Apr 25·4 min readFollowautomated testingasp.net
TFS 2012, .NET 4.5 and C# 6Use C# 6 features on .NET 4.5 with Visual Studio 2015, set MSBuild Arguments and install Microsoft.Net.Compilers on the old build server.John Reilly·Feb 1·1 min readFollowc#asp.netazure devops
UseStaticFiles for ASP.Net FrameworkLearn how to prevent exposing static files to the public when working with ASP.Net Framework. Discover how to implement an allowlist approach.John Reilly·Jan 1·6 min readFollowasp.net
NgValidationFor Baby StepsThe NgValidationFor project translates data annotations to Angular validation directive attributes while minimising dependencies.John Reilly·May 11·4 min readFollowangularjsasp.net
A tale of Angular, html5mode, ASP.Net MVC and ASP.Net Web APIThis article offers tips on how to preserve specific routes while redirecting non-specified URLs to the root angular app page for ASP.Net MVC and Web API.John Reilly·May 5·3 min readFollowangularjsasp.net
Tonight I'll Start an Open Source Project...A new AngularJS validation mechanism aims to propagate data annotations on ASP.NET MVC server models into ng-* directive attributes in HTML.John Reilly·Apr 24·5 min readFollowangularjsasp.net
PartialView.ToString()Learn three ways to turn a `PartialViewResult` into a `string` to reuse the result returned by a controller in a JSON payload.John Reilly·Mar 20·3 min readFollowasp.net
Using Gulp to inject scripts and styles tags directly into your HTMLLearn how to use Gulp to directly inject scripts and styles into your HTML, which speeds up app times and makes the setup simpler.John Reilly·Feb 17·6 min readFollowasp.netnode.js
Deploying from ASP.Net MVC to GitHub Pages using AppVeyor part 2To save time, automating open source projects is key. Using AppVeyor and creating static sites with tools like Wget can help update documentation.John Reilly·Jan 7·4 min readFollowasp.net
Getting more RESTful with Web API and IHttpActionResultLearn how to use HTTP status codes in Web API methods to return successful or failed requests without wrapping the outcomes.John Reilly·Aug 8·2 min readFollowasp.net
AngularJS meet ASP.Net Server ValidationLearn how to perform server-side validation in your AngularJS and ASP.Net project using a `serverError` directive and server response error messages.John Reilly·Aug 1·4 min readFollowangularjsasp.nettypescript