Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run IIS Express from VS2015

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.

like image 897
matterai Avatar asked Sep 14 '15 14:09

matterai


People also ask

How do I fix unable to launch the IIS Express web server?

The reason - bad IIS config file. Try deleting the automatically-created IISExpress folder, which is usually located at %userprofile%/Documents , e.g. C:\Users\[you]\Documents\IISExpress . Don't worry, VS should create it again - correctly, this time - once you run your solution again. This worked for me.

Can IIS Express be accessed remotely?

IIS Express Run From a Remote Machineconfig by going to IISExpress\config in your documents folder. Right click the devenv.exe icon and choose properties. Then select the compatibility tab. You can also choose to change this setting for all users if you wish.


1 Answers

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!

like image 98
matterai Avatar answered Sep 18 '22 16:09

matterai