Cold Start on Net 10 vs Net 9 first API request returns 500, subsequent request work as expected
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
We noticed without changing any settings on IIS server that for .NET 10 applications, after restarting the application pool the first request returns a 500, but subsequent requests return a 200 and work as expected, for the same endpoint.
The setting is on application pool is OnDemand, as was the case with .NET 9 applications. The workaround was to set on the site advanced settings preload to true.
### Expected Behavior
.NET 10 installations on IIS first call on application pool restart should behave as .NET 9, therefore no need to change setting for preload and set it to true.
### Steps To Reproduce
1. Deploy an API application with .NET 10 on an IIS server,
2. Restart the application pool.
3. Send first request to API endpoint.
Result: error code 500
### Exceptions (if any)
_No response_
### .NET Version
10
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.