0

I am trying to open a project/solution on Visual Studio 2017 Community and i get the next error:

enter image description here

I have been googling for this error but i haven't found any solution. Any suggestions?

I hope to have explained well my problem.

Update

I am using VS17 on a Virtual Machine with Windows7 32bits.

Elkin
  • 880
  • 2
  • 12
  • 26
  • Try [this solution](http://stackoverflow.com/a/11476284/6530134)? Or [this](https://forums.iis.net/post/1972812.aspx)? – Timothy G. Apr 14 '17 at 12:47
  • Just a guess but, I see it is in your downloads folder. Did you "unblock" the download before unzipping? I also suggest you move it out of downloads. – Crowcoder Apr 14 '17 at 12:59

2 Answers2

3

I tried the solution proposed by Andrii to delete all <site> inside the <sites> node under the applicationhost.config file but after restarting VS2017 and launch my project, I got the following error:

Unable to connect to web server 'IIS Express'

In the config file, I had to put back the application pool like the following:

<site name="MyApp" id="1">
    <application path="/" applicationPool="Clr4IntegratedAppPool"> <-- HERE
        <virtualDirectory path="/" physicalPath="C:\Git\MyApp\MyApp" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:61508:localhost" />
    </bindings>
</site>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" /> <-- AND HERE

After that restart VS2017 and try again.

Also you might just look at the physicalPath folder specified in the config file... make sure it is writable. Some people specified they had the problem when the folder is encrypted. You can find some other possible solution here:

Creating a virtual directory failed with the error

Community
  • 1
  • 1
Pascal Veilleux
  • 163
  • 1
  • 9
1

I had the same issue few weeks ago. Solved it by opening applicationhost.config mentioned in the error and removing all <site> nodes under the <sites> and then reopening VS.

Andrii Litvinov
  • 12,402
  • 3
  • 52
  • 59
  • Unfortunately it keeps showing the error but thanks anyway – Elkin Apr 14 '17 at 12:57
  • Try to also switch between configuration per user vs stored in project file. Try change IIS Express to to IIS, safe and back. Try run VS as admin. Something from above should help. – Andrii Litvinov Apr 14 '17 at 13:00