6

I've made everything like it has been described here. But when I started my Visual Studio project - it said: "Unable to launch the IIS Express Web server". The start URL specified is not valid. http://dev.local/". By the way, I can launch it, using cmd ("run as administrator", ofc):

> iisexpress /site:WebApiLocal

So, whats the problem? Where am I wrong?

P.S. Visual Studio has been launchedwith admin's rights.

Community
  • 1
  • 1
matterai
  • 3,246
  • 4
  • 17
  • 29
  • Try launching your VS in Admin mode. Also that URL doesn't look like IISExpress. Its usually localhost with a port number. – XtremeBytes Sep 14 '15 at 15:02
  • @XtremeBytes I've wrote in P.S., I had launched VS with "run as administrator". Maybe I wrote it not clearly, sorry. That URL is my own URL, which I want to use with my local webAPI. And I don't want to have any port numbers in the end (as it described in link above). – matterai Sep 14 '15 at 15:11
  • Are you planning to use to defaut 80 port then? Make sure there is no other application is using it. – XtremeBytes Sep 14 '15 at 15:24
  • @XtremeBytes I've checked all my ports using netstat -anb command :) but thank you for your remark! – matterai Sep 14 '15 at 15:32

4 Answers4

5

Ok, I had found solution. I've used local applicationhost.config, which placed in {SolutionDir}.vs\config directory. So, if you have the same problem, check this file or go to the {UsersProfileDirectory}\Documents\IISExpress\config and edit applicationhost.config. Also, you can edit in .csproj tag UseGlobalApplicationHostFile saying to project what kind of applicationhost you want to use:

<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>

Thanks everybody for ideas!

matterai
  • 3,246
  • 4
  • 17
  • 29
2

This can happen if you use an external program (e.g. git) and accidentally delete the applicationhost.config file. A restart of visual studio recreated the file in my case, and it started working again.

gmn
  • 4,199
  • 4
  • 24
  • 46
0

According to other posts, Visual Studio 2015 specifically requires the site bindings to use localhost as host name. No matter what posts show you that you can otherwise modify the config, the modification just works under command line but not in VS.

Either Microsoft patches VS later in an update, or you revert your manual changes.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
0

I meet the same issue after I enable remote requests in IIS Express. to solve this, you have to remove the urlacl you set before.

Community
  • 1
  • 1
Bruce
  • 2,146
  • 2
  • 26
  • 22