Intermittent .NET Aspire Dashboard and Service Failure (Requires Restart)
I am encountering periodic failures with the .NET Aspire dashboard and its associated services. These issues often arise after the system has been running for an extended period. The dashboard and services become entirely unresponsive, and rebooting the machine is the sole resolution I have discovered. This significantly disrupts our workflow.
There are no error messages or log entries that offer any insight into the root cause of this problem. Assistance is needed to diagnose and resolve this issue, which is critical for maintaining the reliability of my .NET Aspire environment.
See https://github.com/dotnet/aspire/issues/4290
The next time this happens, open the browser console.
If this happens more than once on this project you can set https://github.com/dotnet/aspire/blob/6d41a31700c10250f5d33154c9556d1f52b5a2cb/playground/mongo/Mongo.AppHost/appsettings.json#L7 to get dashboard error logs to show up.
@foxminchan This has been happening to me too, and cost me a couple days until I figured out what was going on. Thanks @davidfowl for that info on the additional logging.
Basically what you describe was happening intermittently. Usually after a dependent container (SQL server or other) failed to start. These containers would not be disposed when I stopped debugging.
After adding the logging, I found this message: Unhandled exception. System.IO.IOException: Failed to bind to address https://127.0.0.1:17230: address already in use.
Using TaskManager to kill the Aspire.Dashboard process, which has become orphaned, allows me to proceed. This is why restarting the machine would seemingly fix things IMO.
I hope this helps someone else who is having similar problems.