我試圖使用APPCMD
來設置debug=false
在web.config
,根據documentation。如何使用appcmd在IIS7中設置debug = false
我使用的特定語法是:
APPCMD SET CONFIG "SITE/VDIR" section:compilation /debug:False /commit:APP
輸出
INFO (section:compilation, timetaken:219, hresult:00000000, objects:1) Applied configuration changes to section "system.web/compilation" for "MACHINE/W EBROOT/APPHOST/SITE/VDIR" at configuration commit path "MACHINE/WE BROOT/APPHOST/SITE/VDIR"
之後,debug
仍設置爲true
。
我已排除只讀的文件;我使用進程監視器來查看appcmd實際寫入web.config的正確位置。我的環境是Windows 2008 x64,SP2。
我知道有很多不同的方法來解決問題;不同的配置文件,在xpath,nant等中自己完成,但我特別感興趣的是爲什麼APPCMD
似乎沒有工作,並幫助其他人也可能正在努力工具。謝謝你的幫助!
約翰 - 這已被證實是由MS員工的問題,他寫了一個解決辦法,其可能不是理想的。 – Kev 2009-11-20 20:03:24