`dotnet watch` WebSockets port configuration for HotReload
See original GitHub issueWe should configure static ports like this.
{
"SuperHeroAPI": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"hotReloadEnabled": true,
"hotReloadProfile": "aspnetcore",
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7078;http://localhost:5055",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_AUTO_RELOAD_WS_ENDPOINT": "wss://localhost:35871,ws://localhost:33863"
}
}
Then If you are a vscode remote developer you could just open those ports
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
dotnet watch command - .NET CLI
The dotnet watch command is a file watcher that runs a dotnet command when changes in source code are detected.
Read more >.NET 6 Hot Reload and "Refused to connect to ws ...
NET 6 Hot Reload and "Refused to connect to ws: because it violates the Content Security Policy directive" because Web Sockets.
Read more >VS 2022 Hot Reload - web socket fails to open in ...
js file to my page, which attempts to open a websocket connection to a localhost port on machine, but it always fails. I...
Read more >What's New in ASP.NET Core in .NET 6
NET Hot Reload is enabled whenever you run an ASP.NET Core app using dotnet watch . Previously the dotnet watch command simply restarted...
Read more >Getting started with Minimal web API using ASP.NET Core ...
Setting the port configuration from the command line argument --urls while running the app. We will see each of the approaches and learn...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be impossible to configure this with CspOptions ConnectSources custom sources for trusted domains if ports are always generated randomly!
Also the domain doesn’t have to be localhost, it could be something else