IIS7.5 httpHandlers 自定义Html/shtml/htm后缀映射实现伪静态的方法

[ 2021-01-27 10:52:46 | 作者: admin ]
字号: | |
以添加html后缀的文件的 映射为例:
attachments/202101/27_105402_021111168929069.png


2.点击打开处理程序映射
attachments/202101/27_105427_021112078457836.png


3.添加托管处理程序映射
attachments/202101/27_105433_021112408457518.png


4.请求路径 *.html  类型: System.Web.UI.PageHandlerFactory  名称:Html-Integrate  确定
attachments/202101/27_105454_021114069708596.png


5.添加处理脚本映射
attachments/202101/27_105553_021115014086195.png


6.请求路径 *.html  可执行文件为:C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll (请根据具体情况修改) 名称:htmlRequest(随意)
attachments/202101/27_105625_021117056891331.png



  7.重启IIS

 

Appcmd.exe命令实现:
%windir%\system32\inetsrv\appcmd set config /section:handlers /+[name='Html-Integrate',path='*.html',verb='GET,HEAD',type='System.Web.UI.PageHandlerFactory',preCondition='integratedMode']


来源:https://www.cnblogs.com/iack/p/3703814.html
[最后修改由 admin, 于 2021-01-27 10:58:55]
评论Feed 评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=2757

这篇日志没有评论。

此日志不可发表评论。