We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS Default document setting has error [Answered]RSS

2 replies

Last post Feb 06, 2021 11:46 AM by vj78

  • IIS Default document setting has error

    Feb 05, 2021 07:28 PM|vj78|LINK

    My IIS default document was working a minute ago until I added default.aspx to it.

    Now its giving me error.

    "Cannot add duplicate collection entry of type 'add' with unique key attribute value set to 'default.aspx'

  • Re: IIS Default document setting has error

    Feb 06, 2021 03:59 AM|lextm|LINK

    That's quite common when you have two web applications pointing to the same physical folder (so any changes to configuration file leads to duplicate entries).

    Locate the actual configuration files (applicationHost.config and web.config) so that you might figure out how to get things right.

    Lex Li
    Want to have a chat on the issues you meet? Book an appointment at https://buy.stripe.com/cN24ia0yi7sAdIA7sv
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: IIS Default document setting has error

    Feb 06, 2021 11:46 AM|vj78|LINK

    I had two website with different names pointing at the same location. I deleted one and its working now.