“Unable to launch the IIS Express Web server” erro

2019-01-10 22:11发布

I receive this error when trying to launch IIS Express from Visual Studio with a project that's configured to listen to an address other than localhost. Visual Studio freezes for about 30 seconds before giving the error "Unable to launch the IIS Express Web server".

I've tried all the solutions posted to similar questions and I think I've done everything correctly. Here are the steps that I have taken:

  1. Add the following reservation to HTTP.SYS:

    netsh http add urlacl url=http://+:36899/ user=Everyone

  2. Run Visual Studio 2012 as an administrator (technically I don't think I should even have to since I set up HTTP.SYS manually).

  3. Disable Windows Firewall.

  4. Delete my IISExpress folder in my My Documents folder to ensure the default settings.

  5. Allow Visual Studio to create the entry in applicationhost.config for my web project. Then manually edit the config file to change localhost to 192.168.0.100 which is my local IP. Then go back into the project properties in Visual Studio and change localhost to the IP and save the project so that my project is now set to http://192.168.0.100:36899.

I also tried changing the port and repeating the above steps just incase the port was in use for some reason.

I want to make my IIS Express developer instance accessible from my IP on the Internet for remote testing.

23条回答
对你真心纯属浪费
2楼-- · 2019-01-10 22:32

For me it was the applicationhost.config file in .vs folder in my project solution folder(.vs folder is hidden by default).So,I closed the project and delete the .vs folder (vs will recreate it again when you open the project) then reopen the project and run it.

查看更多
何必那么认真
3楼-- · 2019-01-10 22:34

Try this:

  1. Open Properties of your solution
  2. Go to web
  3. under LOCAL IIS, Change written port number to any other port number and create a new virtual directory.
查看更多
Bombasti
4楼-- · 2019-01-10 22:35

I was changing this entry (for which my web server was not running and showing me access denied error for a particular port)

<bindings>
   <binding protocol="http" bindingInformation="*:61235:localhost" />
</bindings>

in the "applicationhost.config" in "Documents\IISExpress\config" for a particular webapplication it was overwritten by Visual Studio 2012 again to default port whenever I was starting my webapplication.

But I resolved the problem by doing nothing in the applicationhost.config. I just changed the "project properties" > "web" > "project url" setting from http://localhost:62135/ to http://localhost:47279/(depends on your computer) and it worked for me.

查看更多
走好不送
5楼-- · 2019-01-10 22:36

Simply start your Visual Studio as Run as Administrator

Thanks,

查看更多
做自己的国王
6楼-- · 2019-01-10 22:36

In VS 2013 I saw this error after setting up Google Docs synchronization on My Documents. Updated permissions to not be read-only and problem solved.

查看更多
放荡不羁爱自由
7楼-- · 2019-01-10 22:37

I had exactly the same issue. Tried everything but finally one trick worked.

  1. Delete folder IISExpress from "My Documents"
  2. Load your project again, it will create IISExpress folder again with updated configuration
  3. Check IISExpress folder has sufficient permissions to read-write the configuration file
  4. Load project again and Run IISExpress. It should work.
查看更多
登录 后发表回答