1

After updating to Visual Studio 2015, IISExpress stopped working properly.

Each time I start up a new instance of VS I'll get an error that it cannot write to the Applicationhost file because the site already exists.

<site name="MySite" id="1">
  <application path="/">
     <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\MySite" />
  </application>
  <bindings>
     <binding protocol="http" bindingInformation="*:6231:" />
     <binding protocol="https" bindingInformation="*:6231:" />
  </bindings>
</site>

If I remove the site, see above, from the applicationhost.config file (in the .vs folder) and go back to visual studio and tell it to create a new Virtual Directory everything starts working again. But as soon as I restart my instance of Visual Studio I need to do the same all over again.

It's pretty annoying having to do this process each time I need to start Visual Studio

All suggestions appreciated.

1
  • So you have a site at %SystemDrive%\inetpub\MySite?
    – Lex Li
    Apr 16, 2016 at 6:43

1 Answer 1

1

Find the applicationhost.config file, it may be somewhere like C:\Users\yourName\Documents\IISExpress\config\applicationHost.config.

Check the IISExpress folder to make sure it's not read only. If it is read only, make it not read only, and apply those changes to all subfolders. Also check to make sure this folder is not encrypted, and make sure the Documents folder is not encrypted also.

Try running Visual Studio as Administrator and see if that makes a difference.

There are additional things you can try on this Stack Overflow post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.