Reputation: 3438
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.
Upvotes: 6
Views: 10758
Reputation: 4319
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.
Upvotes: 2
Reputation: 2196
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.
Upvotes: 0
Reputation: 3438
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!
Upvotes: 5
Reputation: 63264
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.
Upvotes: 0