I have created a very simple ASP.NET HttpHandler and for some reason it is not being called unless the user is logged on. I have it assigned to handle PNG images. For a first time visitor to the website, the handler is not called. After they logon, then it is called. I am using .NET 4, IIS7 on Windows 7 in Classic mode. The PNG images requested do not exist in the file directory.
namespace MyNS
{
public class MyHttpHandler : IHttpHandler
{
public bool IsReusable { get { return true; } }
public void ProcessRequest( HttpContext context )
{ }
}
}
In my web.config, I have …
<system.webServer>
<handlers>
<add name="MyPNG" path="*.png" verb="*" type="MyNS.MyHttpHandler" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,bitness64" />
</handlers>
</system.webServer>
First of all, if you are using IIS7 in classic mode, you must setup config in two places: link.
Also you need to exclude your handler from authentication:
UPDATE
OK, here is what I mean: