An unhandled exception occurred while processing the request
AI links open with a title + excerpt (these tools can't fetch the page themselves) — use "Copy full article" to paste the complete text for a fuller summary.
Fix: Angular CLI Timeout Error in ASP.NET Core MVC
Category: ASP.NET Core · Angular · Web Development
The Problem
If you're running an ASP.NET Core MVC project with Angular, you may have encountered this frustrating error during startup:
TimeoutException: The Angular CLI process did not start listening
for requests within the timeout period of 0 seconds. Check the log
output for error information.
Microsoft.AspNetCore.SpaServices.Extensions.Util.TaskTimeoutExtensions
.WithTimeout<T>(Task<T> task, TimeSpan timeoutDelay, string message)

This error usually appears when the Angular CLI takes longer to compile than the default timeout allows — especially on slower machines or large projects.
Why Does This Happen?
When ASP.NET Core launches your Angular app via SpaServices, it waits for the Angular CLI to start and listen on a port. If the CLI doesn't respond in time, the app throws a TimeoutException.
The default timeout is often too short (sometimes even 0 seconds), which causes it to fail before Angular even finishes compiling.
The Fix — Increase the Timeout
Open your launchSettings.json file (found under the Properties folder) and add or update the "readyTimeout" property inside iisSettings:
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"readyTimeout": 60000,
"iisExpress": {
"applicationUrl": "http://localhost:16098",
"sslPort": 44332
}
}
Setting "readyTimeout": 60000 gives Angular 60 seconds to start — enough time for most projects to compile successfully.
Quick Summary
| Setting | Value |
|---|---|
| File | Properties/launchSettings.json |
| Property | readyTimeout |
| Recommended Value | 60000 (60 seconds) |
Still Not Working?
If the error persists even after increasing the timeout, try these additional steps:
- Run
npm installinside your Angular project folder to ensure all packages are installed - Delete
node_modulesand runnpm installagain (clean install) - Check the Angular CLI logs in the Output window for more specific errors
- Make sure your Angular CLI version is compatible with your project
Found this helpful? Share it with your team or drop a comment below!
Comments (1)
Nice One