IIS7 支持html页面包含(include)html页面 IIS设置与代码编写

IIS7 支持html页面包含(include)html页面 IIS设置与代码编写
  • 游戏评分:
  • 网络类型:
  • 游戏类型:
  • 收费模式:
  • 运营状态:
  • 运行平台:
  • 游戏语言:
  • 游戏版本:
    1.0
  • 更新时间:
    2023-03-26
  • 游戏厂商:
    未知
  • 游戏题材:

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、点击“请求限制”;

游戏图片
玩家评论