I have defined a custom HTTP handler, to update the request header. But when I am calling http://localhost:52705/Home/Index. my custom HTTP handler is not getting called for that controller -> action request. I implemented as follow
public class TestHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
return;
}
public bool IsReusable { get; private set; }
}
also, find the web.cofing entry for HTTPHandler
<system.webServer>
<handlers>
<add name="TestHandler" type=" mvc_app.Handler.TestHandler" path="*" verb="*"/>
</handlers>
<modules>
<remove name="FormsAuthenticationModule" />
</modules>
</system.webServer>