IIS express: Cannot add duplicate collection entry of type ‘add’ with unique key attribute ‘name’ set to

I think IIS Express probably has 2 <application>-blocks and both will be pointing to the same physicalPath.

Go to the IIS Express config file in: My Documents\IISExpress\config\applicationhost.config

Search for NewProjectName

Change the physicalPath for the root application to something else. Point it to an empty folder.

Should look something like this:

<site name="NewProjectName" id="1">
  <application path="https://stackoverflow.com/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="https://stackoverflow.com/" physicalPath="c:\Temp" />
  </application>
  <application path="/NewProjectName" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="https://stackoverflow.com/" physicalPath="c:\sourcecode\NewProjectName" />
  </application>
  <bindings>
    <binding protocol="http" bindingInformation="*:51123:localhost" />
  </bindings>
</site>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)