Tests failing with TaskCanceledException on Windows Server 2025 Build 7171 #730

Closed
opened 2025-12-29 08:33:06 +01:00 by adam · 1 comment
Owner

Originally created by @oschwald on GitHub (Dec 3, 2025).

Describe the bug

After the recent GitHub Actions runner image update (win25/20251125.122), a test that uses WireMock.Net to return a simple text/plain response with HTTP 406 is now throwing TaskCanceledException on Windows with .NET 10.

The same test passes on:

  • Windows with the previous image (win25/20251102.77)
  • Linux and macOS with the same .NET version
  • Windows with .NET 8 and .NET 9

Failing build: https://github.com/maxmind/GeoIP2-dotnet/actions/runs/19903956765/job/57058325684

Expected behavior

The test should receive the mocked HTTP 406 response and throw our custom HttpException, not a TaskCanceledException.

Test to reproduce

  1. Set up a WireMock server returning HTTP 406 with Content-Type: text/plain
  2. Make a synchronous HTTP request using HttpClient.Send() on .NET 10
  3. Run on Windows Server 2025 Build 7171

Our test code: https://github.com/maxmind/GeoIP2-dotnet/blob/main/MaxMind.GeoIP2.UnitTests/WebServiceClientTests.cs#L146-L157

The main difference between the working and failing runner images is Windows OS Build 6905 -> 7171. That update (KB5068861) mentions stricter HTTP.sys parsing for RFC 9112 compliance around CRLF in chunk extensions. Not sure if that's related, but thought it might be a lead.

Using WireMock.Net 1.16.0.

Originally created by @oschwald on GitHub (Dec 3, 2025). ### Describe the bug After the recent GitHub Actions runner image update (win25/20251125.122), a test that uses WireMock.Net to return a simple `text/plain` response with HTTP 406 is now throwing `TaskCanceledException` on Windows with .NET 10. The same test passes on: - Windows with the previous image (win25/20251102.77) - Linux and macOS with the same .NET version - Windows with .NET 8 and .NET 9 Failing build: https://github.com/maxmind/GeoIP2-dotnet/actions/runs/19903956765/job/57058325684 ### Expected behavior The test should receive the mocked HTTP 406 response and throw our custom `HttpException`, not a `TaskCanceledException`. ### Test to reproduce 1. Set up a WireMock server returning HTTP 406 with `Content-Type: text/plain` 2. Make a synchronous HTTP request using `HttpClient.Send()` on .NET 10 3. Run on Windows Server 2025 Build 7171 Our test code: https://github.com/maxmind/GeoIP2-dotnet/blob/main/MaxMind.GeoIP2.UnitTests/WebServiceClientTests.cs#L146-L157 ### Other related info The main difference between the working and failing runner images is Windows OS Build 6905 -> 7171. That update ([KB5068861](https://support.microsoft.com/en-us/topic/november-11-2025-kb5068861-os-build-26100-7171-24e553d1-2338-433e-9cc3-61733148530c)) mentions stricter HTTP.sys parsing for RFC 9112 compliance around CRLF in chunk extensions. Not sure if that's related, but thought it might be a lead. Using WireMock.Net 1.16.0.
adam added the bug label 2025-12-29 08:33:06 +01:00
adam closed this issue 2025-12-29 08:33:06 +01:00
Author
Owner

@oschwald commented on GitHub (Dec 3, 2025):

Although this was happening repeatedly in CI for a period of hours, it seems like it has gone away. Maybe GitHub changed something in their image. I'll close this for now as I am not sure it is actionable.

@oschwald commented on GitHub (Dec 3, 2025): Although this was happening repeatedly in CI for a period of hours, it seems like it has gone away. Maybe GitHub changed something in their image. I'll close this for now as I am not sure it is actionable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#730