惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
H
Help Net Security
GbyAI
GbyAI
博客园_首页
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
月光博客
月光博客
美团技术团队
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed

博客园 - 玛雅人

五大学习方法 Python AI 与深度学习:每周任务拆分及代码练手 Python AI 与深度学习 - D2.MNIST 手写数字识别 Python基础 - 常用类库汇总 Python AI 与深度学习 - D1.PyTorch 深度学习环境一键配置 ARDUINO - P2:按钮控制LED ARDUINO - P1:BLink Python调用SQLLite3 IIS8.5 安装证书 Kendo 计算字段 Kendo UI 的 k-template UpdatePanel中用后台CS代码调用JS代码,先执行控件事件,后触发JS SQL常用 Node.js 安装 生成缩略图 有用的JS函数 vs2010 mvc3 运算符 || && 如何阻止ASP.NET的按钮控件提交页面
IIS Form 认证 保护HTML页面
玛雅人 · 2011-03-24 · via 博客园 - 玛雅人

原来是没注册 HttpHandler,还有需要提供 buildProviders,

1、在 Web.config 中设置,在 <system.web> 下的 <httpHandlers> 中增加一行
<add verb="*" path="*.htm" type="System.Web.UI.PageHandlerFactory"/>
2、然后在 <system.web> 下的 <compilation> 下添加
<buildProviders>
  <add extension=".htm" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
这下就可以了。

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings/>
<system.web>
<customErrors mode="Off"/><globalization requestEncoding="gb2312" responseEncoding="gb2312" />
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
<buildProviders>
<add extension=".htm" type="System.Web.Compilation.PageBuildProvider"/>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider"/>
</buildProviders>
</compilation><authentication mode="Forms">
<forms name="CCIC.COOK"
loginUrl
="UserBox/login.aspx"
protection
="All"
path
="/"/>
</authentication>
<authorization>
<allow users="*"/>
</authorization><pages validateRequest="false" /><httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="102400" executionTimeout="900"/>
<httpModules>
<add name="WebbHttpModule" type="Cms.FileUpload.WebbHttpModule, Cms.FileUpload"/>
</httpModules>
<httpHandlers>
<add verb="*" path="progress.ashx" type="Cms.FileUpload.WebbUploadStatusHandler, Cms.FileUpload"/>
<add verb="*" path="*.htm" type="System.Web.UI.PageHandlerFactory"/>
<add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
</system.web><location path="_ygtd">
<system.web>
<authorization>
<allow roles="szsfgs"/>
<deny users="*"/>
</authorization>
</system.web>
</location></configuration>