Unable to launch the ASP.NET Development server because port '1900' is in use

前端 未结 19 1104
长情又很酷
长情又很酷 2020-12-09 08:47

I was developing just fine in VS 2008 and testing my ASP.NET web site on my development server when suddenly I was unable to run my web site anymore. As soon as I hit F5, th

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

    In VS 2019, right click on project properties select Debug, scroll down to web server settings, change port number in AppURL

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

    changing the port in Visual studio (Web) Project Properties for IIS express section solved the same problem for me

    Visual studio Project Properties for IIS express port in use problem

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

    Simply end all Webdev.WebServer.exe processes - did the trick for me. Occasionally this 'unable to launch because port is in use' error happens when one of the visual studio processes (webdev.webserver.exe) is still running and locked. The webdev.webserver process(s) should end when you close your browser or app but if they dont (for instance my Visual Studio crashed but if left the webserver still running) then this could lock the port and this will prevent visual studio from launching your project. When you try to F5 your app (launch your application from visual studio) then it conflicts with the current port in use and the above 'because port XYZ is in use' error is displayed.

    So to fix it: in the status bar (next to your windows clock) right-click and 'Stop' all the ASP.net development server icons. You can also open task manager and kill all the webdev.webserver.exe processes.

    enter image description here

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

    I simply stopped service MsDepSvc - Web Deployment Agent Service. Then I was able to run the site.

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

    I had the same problem for a long time. I checked all the ideas written here. Eventually the only thing that worked for me was:

    1. Unload the project by right clicking it.
    2. Opening the .csproj file by right click the unloaded projoect
    3. Reloading the project (without any change)

    Sometimes it solves the problem...

    However, I also have a workaround:

    1. Open your Visual Studio 2008 Command Prompt (Start-> Microsoft Visual Studio 2008 -> Visual Studio Tools -> Command Prompt).
    2. Type : webdev.webserver.exe /port:[your_port] /path:"[your_path]"
      your_port is the desired port for the server, your_path is the path where VS stores your source file. Note that you need to paste only the directory where your .asmx file is.
    3. This should run the server manually and listen on the specified port.
    0 讨论(0)
  • 2020-12-09 09:23

    Just a heads up - I came across this error for Port 8000 and it turns out that I still had Aptana Studio running - which apparently runs a java server on port 8000. Exited Aptana and everything works.

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