加入HttpHandler后无法正常显示网页
写了个HttpHandler类。打开页面只能显示“This is an HttpHandler Test."然后就是空白。请问是什么原因呢?
web.config配置
<httpHandlers>
<add verb="*" path="*.aspx" type="WebUI.HttpHandler.OnlineHandler,WebUI"/>
</httpHandlers>
namespace WebUI.HttpHandler
{
public class OnlineHandler : IHttpHandler
{
public OnlineHandler()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public void ProcessRequest(HttpContext context)
{
context.Response.Write("<H1>This is an HttpHandler Test.</H1>");
}
public bool IsReusable
{
get { return true; }
}
}
}