“Unable to launch the IIS Express Web server.” in Visual Studio

前端 未结 27 1531
清酒与你
清酒与你 2021-01-30 00:44

I attempted to run my web service through visual studio. I faced an issue like :

---------------------------
Microsoft Visual Studio
---------------------------
         


        
相关标签:
27条回答
  • 2021-01-30 00:55

    IIS Express Failing to Start Solution in Visual Studio

    • Go to Task Manager
    • Search for "Application Frame Host" Process
    • End this Process
    • Try to Run Again
    0 讨论(0)
  • 2021-01-30 00:56

    I my case, I binded the application to run on LAN, i.e connect to the application from another devices like mobile. It has to run visual studio as administrator.

    0 讨论(0)
  • 2021-01-30 00:57
    1. Close visual studio
    2. delete ".vs" folder
    3. Try change port "localhost:8080"

    It worked for me.

    0 讨论(0)
  • 2021-01-30 01:00

    After updating Windows 10 and/or Visual Studio 16+ it might happen due to an internal bug that IISExpress fails to register any development website because it no longer accepts localhost connections.

    To fix the issue, you just have to register again the binding. To do so, run from an administrative shell the following command:

    netsh http add iplisten ipaddress=:: 
    
    0 讨论(0)
  • 2021-01-30 01:00

    I had this problem when upgrading an MVC project. I copied over the newer-MVC .csproj over my existing .csproj file then worked back to a fully working Project. What I failed to consider is the existing port number in the old .csproj. The new project had a new port number, yet shared the Project/Assembly Name. That was enough to make IIS Express lose its mind and throw this exception.

    Just digging the old port number out of git and changing the IIS Express URL to include it in Project Settings was enough to fix it.

    0 讨论(0)
  • 2021-01-30 01:05

    From https://www.davidsalter.co.uk/unable-to-launch-the-iis-express-web-server-error-0x80070020/

    Error code 0x80070020 means ERROR_SHARING_VIOLATION, which in the case of IIS Express (or IIS) means that the port that it is attempting to listen on is being used by another process.

    Use the netstat command to find out which application is using the port.

    netstat -ao | findstr <port_number_to_search_for>
    

    The a parameter tells netstat to display all connections and listening ports.

    The o parameter tells netstat to display the process ID associated with the connection.

    Running the above netstat command will produce output such as:

    C:\>netstat -ao | findstr 4026
    TCP    12.0.0.1:4026        cs-pc:4026         LISTENING       9544
    

    The last number displayed (9544 here) is the process ID.

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