Shaul Behr
Shaul Behr

Reputation: 38003

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

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, the message appears:

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

It doesn't matter what port I change to, it's always in use. I have tried:

Clue: My IIS refuses to start. But I didn't have IIS installed when I was happily working earlier, so that is probably not the issue; it might just be highlighting something else.


Update: after rebooting, IIS does start, but the problem here persists.

Upvotes: 32

Views: 127469

Answers (21)

aseman arabsorkhi
aseman arabsorkhi

Reputation: 362

my problem (54790 is in use) solved by following the steps below:

1-Start IIS Manager. One quick way to do this is by opening the Run command, then typing inetmgr and clicking the OK button.

2-In the Connections pane on the left side of the window, navigate to the Server and Site you wish to check its binding .

3-Open bindings.In the Actions pane on the right, click Bindings…

4-delete the port which is in used .

enter image description here

Upvotes: 0

M K Sharma
M K Sharma

Reputation: 163

I faced same issue. But this is working for me when I deleted all window temp files. keyboard typing : 1 - window key + r(open run window) then type "temp" in run window and then delete all files.
2 - type "%temp%" in window run and delete all files.

Above steps resolve by issue.

Upvotes: 0

delwasaf ewrew
delwasaf ewrew

Reputation: 577

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

Upvotes: 5

Sheo Dayal Singh
Sheo Dayal Singh

Reputation: 1673

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

Upvotes: 1

olle
olle

Reputation: 4595

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.

Upvotes: 10

jimo3
jimo3

Reputation: 418

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.

Upvotes: 0

franzo
franzo

Reputation: 1469

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.

Upvotes: 1

Iman
Iman

Reputation: 18906

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

Upvotes: 0

David Gregor
David Gregor

Reputation: 1895

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

Upvotes: 0

jay
jay

Reputation: 1

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.

Upvotes: 0

Spyder
Spyder

Reputation: 4032

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

Upvotes: 45

Steve Kane
Steve Kane

Reputation: 21

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"!

Upvotes: 2

Hal
Hal

Reputation: 1264

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.

Upvotes: 0

Victor
Victor

Reputation: 51

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.

Upvotes: 5

laxmna
laxmna

Reputation: 9

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

Upvotes: 0

denizemektup
denizemektup

Reputation: 1

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

Upvotes: 0

Iain Fraser
Iain Fraser

Reputation: 6738

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

Upvotes: 0

Elad
Elad

Reputation: 20189

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.

Upvotes: 4

hacker
hacker

Reputation: 1115

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.

Upvotes: 1

Chris Ballance
Chris Ballance

Reputation: 34347

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

Upvotes: 0

Nick Berardi
Nick Berardi

Reputation: 54854

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.

Upvotes: 4

Related Questions