Welcome to Ryan Williams' Developer Blog




Ignoring Bots by User Agent in C#

How To Ignore Bot Traffic by User Agent in ASP.NET with C#

Exclude crawlers and bots from logs and analytics in ASP.NET Core by matching user agents against the crawler-user-agents list with one compiled regex.

Tagged: ASP.NET, bots, C Sharp, spam

OpenAI API in C#

Using the OpenAI API in C#: Chat Completions and Responses API

Call the OpenAI API from C# with the official OpenAI NuGet package: Chat Completions, the newer Responses API, streaming, ASP.NET Core DI, and plain HttpClient.

Tagged: AI, C Sharp, ChatGPT

Keeping IIS Sites Alive With PowerShell

Keeping IIS Sites Alive: AlwaysRunning, Preload and a Warm-Up Task

Fix slow first requests on IIS: set Start Mode to AlwaysRunning, Idle Time-out to 0, turn on Preload with Application Initialization, and add a warm-up task.

Tagged: IIS, PowerShell

Spam Filtering With C#

Blog Comment Spam Filtering With C#

How to filter spam comment posts using an API and C# in ASP.NET.

Tagged: APIs, ASP.NET, C Sharp, spam

DappCamp - Web 3.0 Developer Solidity Course

DappCamp - Become a Web 3.0 Developer using Solidity in 3 Weeks - Cohort 2

DappCamp: Transform into a Web 3.0 Developer in just 3 weeks. Dive into my comprehensive review of the Solidity course.


Sending Email With MailChimp

Sending Email With the Mailchimp API in C#

Send an email from C# with the Mailchimp Transactional API, and add or update contacts with the Marketing API using HttpClient. Includes batch sync examples.

Tagged: C Sharp, Email, MailChimp

AWS Step Functions in C#

AWS Step Functions With C#

Details on what AWS Step Functions are and how they can be used in .NET.

Tagged: AWS, C Sharp

SQL Express Database Backups in SQL Server

How To Automate SQL Server Express Database Backups

SQL Server Express has no SQL Agent. Automate daily backups of every database with sp_BackupDatabases, sqlcmd, a batch or PowerShell script, and Task Scheduler.

Tagged: SQL

Prevent Sign Out ASP.NET Core 2.0 Deployment

How To Prevent Sign Out After ASP.NET Core 2.0 Deployment

Example code of how to stay signed in after an ASP.NET Core 2.0 deployment to IIS.