Stop inheriting web.config from parent ASP.NET application in IIS 7.5

前端 未结 4 643
孤城傲影
孤城傲影 2021-01-02 03:22

We have deployed an ASP.NET Website (App 1) in IIS 7.5. Then under that application create another ASP.NET application (App 2). But in App 2, I don\'t want to inherit the

4条回答
  •  没有蜡笔的小新
    2021-01-02 04:03

    You can't wrap the whole configuration element in a . This isn't supported in ASP.NET (yet).

    From the documentation:

    SectionInformation.InheritInChildApplications Property

    The InheritInChildApplications property applies only to location-specific configuration settings.

    Also:

    Gets or sets a value that indicates whether the settings that are specified in the associated configuration section are inherited by applications that reside in a subdirectory of the relevant application.

    elements are special and are not configuration settings as such. They are used to define the handlers for configuration settings.

    If you need to remove a conflicting configuration

    from a child application you can do this in the child application's web.config file with the element:

    remove Element for configSections (General Settings Schema)

提交回复
热议问题