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: P
Simply restarting the computer fixed this for me.
Simply go to taskmanager --> Process --> iisexpress --> right click --> end process tree --> then you can build and run your application
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
In my case I had to do two things:
a. Remove the virtual directory from this file:
C:\Users\<user-name>\Documents\IISExpress\config\applicationhost.config
b. run the program TCPView from: http://technet.microsoft.com/en-us/sysinternals/bb897437 Find the process which is using your port, and "End Process".
After this, in Visual Studio, open the web app project properties, select Web tab, click "Create Virtual Directory" button to re-create the virtual directory. Run the web app in debug mode.
Another option is to delete the applicationhost.config
as well from your local solution folder.
Visual Studio stores this as well in a folder called .vs\config
in the root of your solution folder.
Delete or edit the applicationhost.config
there helped me resolve this
One solution is to delete or clear the history in your browser. Then, restart the Visual Studio and re-run your application.
If this solution doesn't work, then it's time for you to change the port number for your development server (IIS Express).
I hope it helps you.