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

前端 未结 14 2019
旧巷少年郎
旧巷少年郎 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:54

    The answer that @orjanto posted solved the problem for me, but I had an additional problem on top of that. After fixing, Internet Explorer still thought that my HTML page was a directory instead of a file.

    I had duplicates in my IIS Express config file:

    
         
              
         
         
              
         
         
              
              
         
     
    

    Note the path="/login.html" in the second entry.

    My page was redirecting to "localhost:57018/login.html/" like it was a directory.

    Removing the second entry fixed the problem with the configuration file duplicates, however I continued to have a problem where Internet Explorer seemed to think that /login.html/ was a directory (Internet Explorer 11). To diagnose the problem, I checked Chrome and Chrome worked fine.

    I went into Internet Explorer, went to Tools > Internet Options > General Tab. Then under "Browsing History" section, I deleted History, Cookies and Website Data, & Temp. Internet Files.

提交回复
热议问题