需要在web.config中配置 httpHandlers节点:
<add verb="*" path="news/*.html" type="WebApplication2.HttpHandlerDemo"/>
<system.web>
<httpHandlers>
<add verb="*" path="news/*.html" type="WebApplication2.HttpHandlerDemo"/>
</httpHandlers>
。。。。
</system.web>
HttpHandlerDemo代码:
using System;
using System.Da