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

前端 未结 27 1469
清酒与你
清酒与你 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 01:09

    In my case, doing the following did the trick:

    • Delete the Site from .vs\\config\applicationhost.config
    • Delete the Site from Documents\IISExpress\config\applicationhost.config
    • Delete the IISUrl from the .csproj

    When I restarted Visual Studio, it assigned the project a completely new port number and ran perfectly

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

    I had the same problem but it resolved when I restarted using admin privileges. (Might have just been the restart)

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

    I had the same Issue. As @Kautsky Lozano mentions above Another application is using that port.

    So [for a Windows OS] just:

    • Open Resource Monitor (Task Manager -> Performance -> Open Resource Monitor )
    • Click on the Network tab.
    • And at TCP Connections find the application that uses the Local Port that IIS Express uses and close it. (it was firefox on my case)
    0 讨论(0)
  • 2021-01-30 01:10

    I just had this issue even though netstat did not show any conflicts.

    The following fixed it for me:

    1. Close Visual Studio
    2. Open up File Explorer
    3. Navigate to the folder of the offending project
    4. Delete the obj and bin folders
    5. Delete the *.user file (this is probably optional)
    6. Restart Visual Studio and try again
    0 讨论(0)
  • 2021-01-30 01:11

    I was able fix this problem by removing everything from <site> to </site> tags in

    Users/<username>/Documents/IISExpress/config/applicatiohost.config file

    <sites>
      <site>
         .
         .   ===> remove this content including the <site> and </site> tags.
         .
      </site>
    </sites>
    
    0 讨论(0)
  • 2021-01-30 01:12

    Port numbers do not match

    In my case the problem was in my Bindings Tags found in the config file in .vs under my solution folder, the port numbers did not match. The bindings were as follows

    <bindings>
         <binding protocol="http" bindingInformation=":16433:localhost" />
    </bindings>
    

    And in my settings i had url set as http://localhost:1943/

    So what i did was to delete inside binding and run my web app, then it generated new binding with a different number then i copied the new generated port to my settings, then the error went away.

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