SORU
23 NİSAN 2009, PERŞEMBE


Web kaçının.çocuk web config miras uygulama inheritİnChildApplications kullanarak

Eklemek için çalışıyorum

<location inheritInChildApplications="false">

benim ana web uygulaması, web.config ama çalışıyor gibi görünmüyor.

Benim ebeveyn vardır: web.config

<configuration>
    <configSections>
    </configSections>

    // 10 or so custom config sections like log4net, hibernate,

    <connectionStrings>
    </connectionStrings>

    <appSettings>
    </appSettings>

    <system.diagnostics>
    </system.diagnostics>

    <system.web>
         <webParts>
         </webParts>
         <membership>
         </membership>

         <compilation>
         </compilation>
    </system.web>

    <location ..>
    <system.web>
        </system.web>
    </location>

    <system.webServer>
    </system.webServer>

Web uygulama IIS içinde bir uygulama olarak kur, ve üst nesneden devralmasını çocuğum sorunlara neden olan web.config.

Tam olarak nereye koymalıyım

<location inheritInChildApplications="false">

tüm çeşitli web yoksayar.ayarlar config?

CEVAP
11 Mayıs 2011, ÇARŞAMBA


Bir önceki soru için ziyaretçi belirtildiği gibi, değil sadece satırı ekleyin

<location path="." inheritInChildApplications="false">

<configuration> hemen altında. Bunun yerine, tek bir web sarmalıyız.hangi devralma devre dışı bırakmak istediğiniz bölümleri config. Örneğin:

<!-- disable inheritance for the connectionStrings section -->
<location path="." inheritInChildApplications="false">
   <connectionStrings>
   </connectionStrings>
</location>

<!-- leave inheritance enabled for appSettings -->
<appSettings>
</appSettings>

<!-- disable inheritance for the system.web section -->
<location path="." inheritInChildApplications="false">
   <system.web>
        <webParts>
        </webParts>
        <membership>
        </membership>

        <compilation>
        </compilation>
      </system.web>
 </location>

<clear /> bazı yapılandırma bölümleri için çalışmak olsa da, bunun yerine <remove name="..."> bir yönerge gerektiren bazı vardır, ve hala diğerleri de destek görünmüyor. Bu durumda, muhtemelen uygun inheritInChildApplications="false" ayarlamak için.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • ethr95awd

    ethr95awd

    8 Kasım 2006
  • MusicDeluxeTV

    MusicDeluxeT

    14 Mayıs 2010
  • spederson7

    spederson7

    17 Temmuz 2006