Subsites do not inherit the parent's Webconfig

Source: Internet
Author: User

Environmental W10 iis10/win2012

There was previously a Web site on IIS, which later wrote an interface item that needs to be hooked up to this web site as a Web application.

After you right-click Add Application, point to interface item. The interface project is not reachable. There is a problem with the configuration.

Looking for a long time on the Internet, using a configuration specifies that subsites do not inherit the Webconfig configuration of the parent Web site

The test is feasible:

In the webconfig of the parent site, set a layer outside the <system.web> section

<location path= "." Allowoverride= "true" inheritinchildapplications= "false" >

<system.web>

....

</system.web>

</location>

This means that the subsite is not allowed to inherit this configuration

Tested. Subsites and main web sites can be opened without interference

In addition, there is no test method: Add <clear/> In the relevant configuration of the subsite

In the subsite, for example, this app profile section

<appSettings>
<clear/>//add a sentence, meaning not to inherit the original

...

</appSettings>

Subsites do not inherit the parent's Webconfig

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.