Reputation: 38003
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
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 .
Upvotes: 0
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
Reputation: 577
In VS 2019, right click on project properties select Debug, scroll down to web server settings, change port number in AppURL
Upvotes: 5
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
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
Reputation: 1469
For a webforms site:
Upvotes: 1
Reputation: 18906
changing the port in Visual studio (Web) Project Properties for IIS express section solved the same problem for me
Upvotes: 0
Reputation: 1895
I simply stopped service MsDepSvc - Web Deployment Agent Service. Then I was able to run the site.
Upvotes: 0
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
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.
Upvotes: 45
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
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
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
Reputation: 9
Just check there are two instance of vs2008 running in the sidebar.. :)
Upvotes: 0
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
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
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:
Sometimes it solves the problem...
However, I also have a workaround:
webdev.webserver.exe /port:[your_port] /path:"[your_path]"
Upvotes: 4
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
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
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