Iis7 Asp.net configuration default document Error

Source: Internet
Author: User

 

The following error occurs when configuring the Asp.net program in iis7:

Configuration error: When the unique key property "value" is set to "default. aspx", duplicate set items of the type "add" cannot be added.
Configuration File

File: // *******/web/Web. config

 

 

 

 

In web. config

<Defadocument document>
<Files>
<Add value = "default. aspx"/>
</Files>
</Defadocument document>

The error occurs because the default document is set to default in IIS. aspx. At this time, Asp.net obtains another add with the same value, causing an exception. The solution is to add <clear/> before <Add/>.

ModifyWeb. config is

<Defadocument document>
<Files>
<Clear/>
<Add value = "default. aspx"/>
</Files>
</Defadocument document>

 

This method applies to any. Net configuration that may produce inheritance obfuscation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.