VS 2022 17.9.4 Hot Reload Razor Pages Project run debug WebSocket failed to connect.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
aspnetcore-browser-refresh.js:268 WebSocket connection to 'ws://localhost:58957/XuanHe.Web/' failed:
(anonymous) @ aspnetcore-browser-refresh.js:268
getWebSocket @ aspnetcore-browser-refresh.js:265
(anonymous) @ aspnetcore-browser-refresh.js:16
aspnetcore-browser-refresh.js:19 WebSocket failed to connect.
aspnetcore-browser-refresh.js:23 Unable to establish a connection to the browser refresh server.

### Expected Behavior
_No response_
### Steps To Reproduce
IDE 
Project configure
```
net7.0
enable
enable
Linux
..\..
....
```
### Exceptions (if any)
aspnetcore-browser-refresh.js:268 WebSocket connection to 'ws://localhost:58957/XuanHe.Web/' failed:
(anonymous) @ aspnetcore-browser-refresh.js:268
getWebSocket @ aspnetcore-browser-refresh.js:265
(anonymous) @ aspnetcore-browser-refresh.js:16
aspnetcore-browser-refresh.js:19 WebSocket failed to connect.
aspnetcore-browser-refresh.js:23 Unable to establish a connection to the browser refresh server.

### .NET Version
8.0.202
### Anything else?
_No response_
Contributor guide
Research direction
Start by reproducing the failure with the shown Microsoft.NET.Sdk.Web project, Visual Studio 2022 17.9.4, and the listed .NET versions. Inspect the reported aspnetcore-browser-refresh.js WebSocket connection and its localhost URL. Done means the Razor Pages debug session connects to the browser refresh server without the reported console errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100