I’ve created a sample project to simplify my problem. I have this simple handler:
public class HandleThis : IHttpHandler, IRequiresSessionState
{
public void ProcessRequest( System.Web.HttpContext context )
{
// Score.aspx just says "success"
context.Response.Redirect( "Score.aspx" );
}
public bool IsReusable { get { return true; } }
}
Then, in my config, I have this:
<httpHandlers>
<add verb="*"
path="Survey"
type="HttpHandlerTest.HandleThis, HttpHandlerTest" />
Now when I hit http://server/Survey my handler fires.
If I change my project to run with IIS 6, it won’t fire (404).
I tried manually adding the handler in IIS via:
– Web Site Properties
– Home Directory
– Configuration
– Add (browse to my site’s .dll), Extension: Survey, uncheck “Verify that file exists”
I notice that IIS (so helpfully) adds the “.” in front of my extension, so I hit the site with “b.Survey”; still 404.
Surely it’s possible to add a handler in IIS 6?
“I tried manually adding the handler in IIS via: – Web Site Properties – Home Directory – Configuration – Add (browse to my site’s .dll), Extension: Survey, uncheck Verify that file exists”
It sounds like you’re using the wrong “executable” path. The executable path should point to the aspnet isapi dll, not the dll that contains your HttpHandler implementation.
Try using the same path that the .aspx extension is mapped to (often this is: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).