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

前端 未结 14 1772
旧巷少年郎
旧巷少年郎 2020-12-29 02:11

In Visual studio, Solution->Web.Project->Properties->Web, I have changed my Project Url from http://localhost:51123/ to http://localhost:51123/NewProj

14条回答
  •  被撕碎了的回忆
    2020-12-29 02:46

    If you create an IIS website with the physical path the same as the project folder, and then use it create a virtual folder for the project, you are going to see this issue.
    Your Web.config file is being loaded twice.
    Instead as orjanto pointed out, create an empty folder and point the IIS website to it and then use it to create a virtual folder from Visual Studio.

提交回复
热议问题