In Visual studio, Solution->Web.Project->Properties->Web, I have changed my Project Url from http://localhost:51123/
to http://localhost:51123/NewProj
I started randomly getting this error. I noticed that the iis express had two sites.
This double layer is causing IIS to read the web.config
from the first site and second at \WFM
, therefore finding duplicates. I just stopped all the sites and removed the \WFM
from my web project path. However you could go clear the files and folders from your temp file in IIS express. In my case I had multiple versions of the solution and one solution's project\user config had an extra path in the web project URL. VS 2015 added it, or someone checked in their own user config to TFS. Hope this helps others.