除了啟用預先載入外,還必須要到這個網站使用的應用程式集區的進階設定內,設定啟動模式為AlwaysRunning,這樣才會在應用程式啟動時,觸發應用程式的第一個要求。
2015年5月11日 星期一
2015年5月6日 星期三
子應用程式的web.config不受上層web.config的影響
在Google上看了很多前輩的相關文章,都提到要在上層web.comfig加入
但一直無效,最後在一國外網站找到解決,原來<location path="." inheritInChildApplications="false"></location>不是只框住<system.web></system.web>就好,而是要把會影響到子應用程式的區域都框起來。
例如:
解決方法來源:http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic
<location path="." inheritInChildApplications="false"> <system.web> </system.web> </location>
但一直無效,最後在一國外網站找到解決,原來<location path="." inheritInChildApplications="false"></location>不是只框住<system.web></system.web>就好,而是要把會影響到子應用程式的區域都框起來。
例如:
<!-- 要遮掉的區域 -->
<location path="." inheritInChildApplications="false">
<connectionStrings>
</connectionStrings>
</location>
<!-- 要留的區域 -->
<appSettings>
</appSettings>
<!-- 要遮掉的區域 -->
<location path="." inheritInChildApplications="false">
<system.web>
<webParts>
</webParts>
<membership>
</membership>
<compilation>
</compilation>
</system.web>
</location>
解決方法來源:http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic
標籤:
應用程式,
web.config,
web.config互相影響
位置:
台灣
訂閱:
文章 (Atom)


