Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable To Launch Web Server

I have asp.net web application project in visual studio 2012. When I want to start it, I have the following error:

Unable to launch the IIS Express Web server: Port"4012" is in use

This problem came from nothing.How can I resolve it ?

like image 704
TheChampp Avatar asked Feb 02 '13 09:02

TheChampp


People also ask

How do I fix unable to start debugging on web server?

Restart your Application Pool. Check that your Web Application folder has the right permissions. Make sure that you give IIS_IUSRS, IUSR, or the specific user associated with the Application Pool read and execute rights for the Web Application folder. Fix the issue and restart your Application Pool.

What is IISExpress?

IIS Express is a lightweight, self-contained version of IIS optimized for developers. IIS Express makes it easy to use the most current version of IIS to develop and test websites.

How to fix “unable to launch the IIS Express web server” error?

Solution to "Unable to Launch the IIS Express Web Server" Step 1. Right-click on your solution and select Properties as shown in the following figure. Step 2. Select “Web” from the left menu. Step 3. Under “Use local IIS server” change the port number from http://localhost:58030/ to another one. ...

How do I fix unable to start web server error?

Unable to start web server error normally occurs when there are multiple exceptions due to missing api's or jars in the classpath. Solution #1: Make sure all spring starter dependancies are in place. Add all springboot dependancies, viz spring boot starter web.. Once dependancies are added, perform maven clean and build if required.

Why can't I start debugging on the web server?

The Unable to start debugging on the Web server message is generic. Usually, a more specific message is included in the error string and that may help you identify the cause of the problem or search for a more exact fix. Here are a few of the more common error messages that are appended to the main error message:

Why is my IIS server not working?

See Check your IIS Configuration. If these settings are already correct and you are debugging locally, also verify that you are connecting to the correct server type and URL (in Properties > Web > Servers or Properties > Debug, depending on your project type). (503) Server Unavailable.


2 Answers

I was having similar problem in visual studio 2012:

ERROR: " Unable to launch IIS Express web server.

Failed to register URL http://localhost:1030/ for site "MySite" application "/". Error Description: The process cannot use file because it is being used by another process. (0x85968574) "

REASON : Actually this port numbers are dynamically generated at runtime. It dosent guranteed to be available. If it is acquires by some other process project wont run. So we need to try at another port.

SOLUTION : There are various solution i found on internet but problem remains unsolved. Finally I tried following solution :

  1. Right click on project in solution Explorer -> Properties
  2. Click on to Web (On LHS).
  3. Look at local IIS Web Server (Which would be radio btn selected by default).
  4. Change port no of project Url e.g : http://localhost:1030/ to http://localhost:45896/ (Possibly Higher than 1024)
  5. Save changes and run application.

This makes changes in IIS config files and wherever needed automatically so we don't need to change any code explicitly. That's work for me hope will work for You too.

like image 132
Kedar.Aitawdekar Avatar answered Sep 24 '22 06:09

Kedar.Aitawdekar


From the MSDN library

Visual Studio cannot guarantee that the port you specify will be available when you run your file-system Web site. If the port is in use when you run a page, Visual Studio displays an error message.

To change the port used by IIS Express to run your program you should follow the procedure outlined by this article on MSDN

How to: Specify a Port for the Development Server

In short, we need to edit the file %systemdrive%:\Users\<username>\Documents\IISExpress\config and change the binding information found in this file and change other configurations for the IIS Express.

As a consequence of this not so simple way to fix the problem, I recommend to close the application that tries to use that port access on you dev computer. Look for specific tools like TCPView from Microsoft that could help to spot the application that grabbed your port. Often it is only the browser

like image 23
Steve Avatar answered Sep 25 '22 06:09

Steve