When trying to launch a web program in Visual Studio 2017 via Google Chrome, you get this error:
Unable to start program http://localhost:xxx
An operation is not legal in the current state
Google Chrome will display this message:
Chrome script debugging in Visual Studio is enabled…
The program is unable to start because JavaScript debugging for ASP.NET (Chrome and IE) is turned on.
To fix this:
- In Visual Studio, click Tools -> Options
- Navigate to Debugging -> General
- Untick Enable JavaScript debugging for ASP.NET (Chrome and IE)
- Click OK
- Stop debugging, then try again