IIS7 支(zhī)持html頁麵包含(include)html頁麵 IIS設置與代碼編寫
1:處理映射程序
添加模塊映射 請求(qiú)路徑 *.html 模塊選擇 ServerSideIncludeModule,名稱(chēng)填寫:SSINC-html
2:重新啟動IIS
3:其中一個頁麵(miàn) 中寫 <!--#include virtual="/IndexInclude/downcc.html" -->
4:downcc.html 為utf-8編碼,發現在引入後頁麵有空白(bái)頁,請刪除BOM
5:生成downcc.html時 編碼
Encoding code = new UTF8Encoding(false); // create encoding with no BOM
StreamWriter sw = new StreamWriter(path + htmlfilename, false, code);
這樣就解決IIS7不支持include的問題,以及出現頁(yè)麵空白的問題。
圖文教程:
1、找到處理映射
2、雙擊進去找到“添加模(mó)塊映射”;
3、進入到(dào)模塊映射中(zhōng),如圖配置
4、點擊“請求限製”;
關鍵詞(cí):IIS7,IIS
閱讀本文後您有什麽感想? 已(yǐ)有 人給出評價!
- 0
- 0
- 0
- 0
- 0
- 1