asp.nethttphandlerihttphandler

ASP.Net HttpHandler ProcessRequest() firing twice


I have a strange issue where i have a a HttpHandler having its ProcessRequest() event firing twice.

i have nothing else in the class except a pointer to a static method so i'm lost.

I have done some googling to no avail even thought it appears a few people are having similar issues:

Code:

    public bool IsReusable
    {
        get { return true; }
    }

    public void ProcessRequest(HttpContext context)
    {
        Common.Tracker.TrackPageView(context);
    }

Solution

  • Scrap this.

    I have been testing in firefox and this ONLY happens when i directly call the handler.

    If i have the handler set up as an image src this doesn't happen.

    additionally in IE this doesn't happen - it is firefox only.

    i thought it could be my extensions (specifically firebug or YSLOW), so i manually disabled them one by one and it was still happening so i have no idea but firefox makes two calls to a page.

    maybe it is similar to this old post as i'm returning a GIF as the content type: http://www.hanselman.com/blog/InternetExplorerAndTheMagicOfMicrosoftKBArticleQ293792.aspx

    hope this helps someone as that is a couple of hours i'll never get back...