Repository navigation
Description
Description
After enabling runtime-async unconditionally in System.Private.CoreLib (#126680, #126594), IIS in-process hosted ASP.NET Core applications return HTTP 500 for all requests. The application starts successfully (ANCM logs confirm "started the coreclr in-process successfully") but every subsequent HTTP request fails with 500 Internal Server Error — the managed request pipeline never produces a successful response.
This was discovered via a codeflow PR in dotnet/aspnetcore (#66239) that brings in runtime changes from commit range 655c517c...ce3e7165.
Reproduction
Failing test: IIS.NewShim.FunctionalTests.StartupTests.StartsWithPortableAndBootstraperExe
Helix job: db741402-6d7f-4dfc-bea7-30db6cf73900, work item IIS.NewShim.FunctionalTests--net11.0
The test deploys an ASP.NET Core app (InProcessWebSite) to IIS using the in-process hosting model, then sends GET requests to /HelloWorld expecting a 200 response with body "Hello World". Instead, every request returns 500 Internal Server Error.
Key observations from the Helix logs
The ANCM (ASP.NET Core Module) logs show the app starts without errors:
[aspnetcorev2_inprocess.dll] In-process callbacks set
[aspnetcorev2_inprocess.dll] Event Log: 'Application '...' started the coreclr in-process successfully.'
But all HTTP requests return 500:
StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1
Server: Microsoft-IIS/10.0
The test retries 10 times over ~11 seconds, receiving 500 each time, then fails:
System.InvalidOperationException : Didn't get response that satisfies predicate after 10 retries
No exception or error message is logged by the application itself — the 500 appears to come from the request pipeline silently failing to complete.
Suspected cause
The runtime diff between the working and broken builds includes two commits that enable runtime-async unconditionally:
- 714d206 — Enable runtime-async in CoreCLR System.Private.CoreLib (#126594)
- ddba785 — Enable runtime-async unconditionally in System.Private.CoreLib (CoreCLR and NativeAOT) (#126680)
IIS in-process hosting has a complex interaction between the native ANCM module and managed async code — the ASP.NET Core request pipeline runs async methods within the IIS worker process, with continuations that cross native/managed boundaries. A change in how async continuations are scheduled or how tasks complete at the JIT level could cause the request handler to fail without completing the response.
Suggested investigation
- Confirm by running the failing test with
DOTNET_JitEnableRuntimeAsync=0— if the test passes with runtime-async disabled, this confirms the root cause. - Investigate the interaction between runtime-async and the IIS in-process hosting model's
IHttpApplication.ProcessRequestAsync/IISHttpContextpipeline.
Environment
- OS: Windows Server (Helix agent:
Microsoft Windows NT 10.0.26100.0) - Runtime: .NET 11.0 Preview 4 (
11.0.0-preview.4.26210.110) - aspnetcore PR: [main] Source code updates from dotnet/dotnet aspnetcore#66239
- Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1378813
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Apr 14, 2026
Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.
wtgodbe commentedon Apr 15, 2026
CC @agocke for runtime-async
Quarantine IIS NewShim StartupTests failing due to runtime-async
Quarantine IIS NewShim StartupTests only (not other IIS variants)
Quarantine ShutdownTests.OutOfProcessToInProcessHostingModelSwitchWor…
Quarantine entire ShutdownTests class for NewShim
[main] Source code updates from dotnet/dotnet (#66239)
dotnet-policy-service commentedon Apr 15, 2026
Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.
ManickaP commentedon Apr 15, 2026
I've changed the area, hopefully correctly. Looking at the commits diff, there's no networking change that looks suspicious or could be source of this problem IMHO (only disabled tests, improved exception in Smtp).
2 remaining items
dotnet-policy-service commentedon Apr 16, 2026
Tagging subscribers to this area: @dotnet/area-extensions-logging
See info in area-owners.md if you want to be subscribed.
tarekgh commentedon Apr 16, 2026
I added my analysis in the comment #126995 (comment) as I think this is same cause. We need to wait @ericstj to advise the course of action here.
Unquarantine IIS StartupTests for dotnet/runtime#126925
Unquarantine IIS StartupTests for dotnet/runtime#126925 (#67418)
Unquarantine IIS NewShim ShutdownTests (dotnet/runtime#126925)
Unquarantine IIS NewShim ShutdownTests (dotnet/runtime#126925)
[test-quarantine] Unquarantine DataProtectionProviderTests.System_Use…
[test-quarantine] Unquarantine IIS NewShim ShutdownTests (dotnet/runt…