Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jun 04, 2018 @ 11:59
    Ismail Mayat
    0

    HttpHandler not firing

    I am using Umbraco 7.6.5. I have a bunch of httphandlers, one for handling robots.txt, one for sitemap and one for pdf files. The first 2 fire fine, however my pdf one does not fire. My web.config looks like

    <add name="FileRedirectHandler" verb="GET" path="*.pdf" type="OneCms.BusinessLogic.Handlers.FileRedirectHandler, OneCms.BusinessLogic" />
      <add name="RobotsHandler" verb="GET" path="robots.txt" type="OneCms.BusinessLogic.Handlers.RobotsHandler, OneCms.BusinessLogic" />
      <add verb="*" name="sitemap.xml" path="/sitemap.xml" type="OneCms.BusinessLogic.Handlers.SitemapHandler, OneCms.BusinessLogic" />
    

    Anyone any ideas?

    Regards

    Ismail

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Jun 04, 2018 @ 12:06
    Dave Woestenborghs
    101

    Hi Ismail,

    Are your pdf in the media folder ? That has it's own web.config. Maybe the handlers section get's overwritten there ?

    Dave

  • Pawel Bres 39 posts 160 karma points c-trib
    Jun 04, 2018 @ 12:07
    Pawel Bres
    0

    Hey Ismail

    I would say it's related to static files handling, please have a look at this

    https://www.hanselman.com/blog/ConditionallyServeFilesStaticallyOrDynamicallyWithHttpHandlers.aspx

    Your request to pdf file probably never reach ASP.Net and it's served as a static file straight from the IIS

    Cheers

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jun 04, 2018 @ 12:11
    Ismail Mayat
    0

    Pawel as mentioned by dave there is config file in media folder im guessing issue is there. So Dave i should my handler there?

    Regards

    Ismail

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Jun 04, 2018 @ 12:13
    Dave Woestenborghs
    0

    Hi Ismail,

    I would add it there as well.

    Dave

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Jun 04, 2018 @ 12:14
    Ismail Mayat
    0

    bingo, can you add another coffee on that tab, ill get em for you when u come uk or pl fest lol.

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Jun 04, 2018 @ 12:15
    Dave Woestenborghs
    0

    That's going to be one hell of a cafeine shot :-D

    Dave

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies