1:處理映射程序
添加模塊映射 請求路徑 *.html 模塊選擇 ServerSideIncludeModule,名稱填寫:SSINC-html
2:重新啟動IIS
3:其中一個頁面 中寫<!--#include virtual="/IndexInclude/downcc.html" -->
4:downcc.html 為utf-8編碼,發現在引入后頁面有空白頁,請刪除BOM
5:生成downcc.html時 編碼
Encoding code = new UTF8Encoding(false); // create encoding with no BOM
StreamWriter sw = new StreamWriter(path + htmlfilename, false, code);
這樣就解決IIS7不支持include的問題,以及出現頁面空白的問題。
圖文教程:
1、找到處理映射
2、雙擊進去找到“添加模塊映射”;
3、進入到模塊映射中,如圖配置
4、點擊“請求限制”;
|
新聞熱點
疑難解答