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

旧时模样 提交于 2019-11-28 08:09:38

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.

olle

You can check what software is running on given port by running netstat -o from the command prompt. It will give the Process ID (PID) of the process. I've had this happen after installing Skype, that was bound to port 80 before IIS could.

You can also check the eventlog for messages why IIS won't start. It might give enough information to solve the problem or to google it.

The problem was solved for me configuring NOD32 firewall to no longer see VS like a browser.

Setup>Antivirus & AntiSpy>Internet protection>HTTP

Just uncheck the vs, and the issue will be resolved.

I hope this finally helps.

Right click on the little "server page" running in your task bar, and click close. This usually happens when the DEBUG process terminates unexpectedly, or visual studio crashes. Try a really high port like 50000 and see if it works. There shouldn't be any processes using that port.

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.
Steve Kane

I found a solution that doesn't require rebooting (for Windows 7).

Next to the clock, there's a tray of icons that is accessible if you click on the triangle icon that is next to the flag. Look for an icon with tooltip "ASP.net development server - port ###". Right click and select "stop"!

One thing I have tried in the past when this type of thing happened is telneting to the port and doing a GET or HEAD:

telnet localhost 1900

Then type in HEAD and press enter. Sometimes the data returned shows something like a server name or an application name.

Just check there are two instance of vs2008 running in the sidebar.. :)

For a webforms site:

  1. Remove the project from the solution.
  2. Edit %userprofile%\Documents\IISExpress\config\applicationhost.config and remove the section for the problem port.
  3. Add the project back to the solution.

Set Cassini (Visual studio's lightweight built in web server) to use a different port. You can do this in the project's configuration dialogs

I had this same problem today and found a solution so I thought I would add my two cents:

My particular problem was that I would get the "Port in use" error message even though the development server was clearly running and I was able to use the application on it. As it transpired, I was working on a Web Service at the time and happened to have the design view open - without realising. It was this web service's design view that was trying to launch the development server - which is why I couldn't type a single character of code without getting the error.

Close your Web Service's design view... problem solved.

I sincerely hope this helps someone else someday too.

Cheers

Iain

I had same problem, "unable to launch asp.net development server" The reason is virus program... I had disable it the it works properly...

I hope this helps...

Hal

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.

jay

I had the same issue. The problem was that I also had IIS configured to use those ports. Stopping IIS or changing the ports used in the solution was may solution.

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

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

In the website portion of the project, right click and do "Properties Window" NOT "Property Pages" Change "Use Dynamic Ports" to TRUE. You can keep 80 there if it's the port listed--the key is to Use Dynamic Ports.

Just re-start the system , Problem would be resolved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!