I created a asp.net website and published it in iis 7. I deleted the default website option in the iis 7 and created the new website in the iis 7.
When i click the default document I got the error like "Error cannot add duplicate collection entry of type add with unique key attribute 'value' set to index.aspx". I used the following code in my web.config file.
IIS7 defines a defaultDocument section in its configuration files which can be found in the %WinDir%\System32\InetSrv\Config folder. Most likely, the file index.aspx is already defined as a default document in one of IIS7's configuration files and you are adding
it again in your web.config.
I suspect that removing the line <add
from the defaultDocument/files section will fix your issue.
The defaultDocument section of your config will look like: