Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

前端 未结 20 2174
醉话见心
醉话见心 2020-12-12 08:43

After fresh installation of Visual Studio 2017 I tried to run .NET Core Web project and when trying to run it on Chrome I am getting this error:

Unabl

相关标签:
20条回答
  • 2020-12-12 09:05

    I think that this happens when javascript debugging is enabled in visual studio and at the same time the chrome developer tools debugger is enabled. The problem arises because two different debuggers trying to debug the same process.

    0 讨论(0)
  • 2020-12-12 09:06

    I use chrome's build in developer console tools to debug javascript so the answer marked solution works great for me.
    This is the weird error message i was getting from VS Community 2017 when trying to debug asp.net app:

    "An error occurred that usually indicates a corrupt installation (code 0x80040154). If the problem persists, repair your Visual Studio installation via 'Add or Remove Programs' in Control Panel." and it's fixed now.

    0 讨论(0)
  • 2020-12-12 09:06

    Incase you are not able to resolve the issue in any other way, then try this(it worked for me!):

    Keep this below code into your web config file then rename value="yourwebformname.aspx"

    <system.webServer>
        <defaultDocument>
           <files>
              <add value="insertion.aspx" />
           </files>
        </defaultDocument>
        <directoryBrowse enabled="false" />
    </system.webServer>
    

    else Try:

    <system.webServer>
        <directoryBrowse enabled="true" />
    </system.webServer>
    
    0 讨论(0)
  • 2020-12-12 09:08

    I just closed all open chrome instances, stopped my project and then start it again. that fixed the problem for me.

    0 讨论(0)
  • 2020-12-12 09:08

    Changing this project setting solve the issue for me.

    0 讨论(0)
  • 2020-12-12 09:10

    For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, which I believe is a new feature introduced in VS 2017.

    Go to Tools > Options > Debugging > General and turn off the setting for Enable JavaScript Debugging for ASP.NET (Chrome and IE).

    This is a known issue already, and seems to have an investigation underway.

    Full information about JS debugging in VS 2017 here: https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/

    0 讨论(0)
提交回复
热议问题