Skip to content

Improve HttpListener NTLM test failure diagnostics - #135322

Merged
wfurt merged 1 commit into
dotnet:mainfrom
wfurt:fix-135190
Oct 7, 2026
Merged

wfurt merged 1 commit into
dotnet:mainfrom
wfurt:fix-135190

Conversation

@wfurt

@wfurt wfurt commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the coarse NtlmHandshakeResult enum with a result that preserves authentication state, HTTP status, and the failing handshake stage
  • keep the existing requirement that changing extended-protection policy between NTLM legs is rejected with HTTP 401
  • improve assertion output so another occurrence of System.Net.Tests.HttpListenerAuthenticationTests fail with UnexpectedFailure #135190 identifies whether the failure came from token creation, challenge parsing, context timing, or the final response

This is primarily a diagnostic contribution to #135190 and may help narrow or stabilize the intermittent failure. We did not reproduce the original UnexpectedFailure, so this PR intentionally does not relax the expected behavior. We can watch CI for further occurrences and use the added details if it fails again.

Validation

  • build.cmd clr+libs -rc release
  • dotnet build /t:test src\libraries\System.Net.HttpListener\tests\System.Net.HttpListener.Tests.csproj: 695 total, 0 failed, 7 skipped
  • NativeAOT Release build of System.Net.HttpListener.Tests
  • NativeAOT Helix one-shot validation on Windows Server 2019/RS5, Server 2022, Server 2025, and Windows 11
  • NativeAOT Helix stress validation: 50 fresh instances per queue, 200 total, all passed with the original HTTP 401 expectation

Note

This pull request description was prepared with GitHub Copilot assistance.

Preserve the exact NTLM handshake stage and HTTP status when the extended-protection policy test fails, instead of reporting only UnexpectedFailure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@wfurt
wfurt merged commit eb85627 into dotnet:main Oct 7, 2026
85 of 87 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants