When I add an HTTP handler:
<add verb="*" path="*test.aspx" type="Handler"/>
With the class:
using System;
using System.Web;
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable
{
get { return false; }
}
}
My ASP.NET application dies with the error "Could not load type 'Handler'." when I try to access http://localhost:port/mysite/this-is-a-test.aspx.
I thought maybe it was a namespace issue, so I tried what follows, but got the same "Could not load type 'Test.Handler'." error.
<add verb="*" path="*test.aspx" type="Test.Handler, Test"/>
With the class:
using System;
using System.Web;
namespace Test
{
public class Handler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
}
public bool IsReusable
{
get { return false; }
}
}
}
I knew I was getting rusty with ASP.NET, but I'm without a clue on this one.