Copied to clipboard

Flag this post as spam?

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


  • james 37 posts 121 karma points c-trib
    Jun 02, 2017 @ 14:26
    james
    0

    Media Protect 2 not blocking images on 7.6

    Hi Richard,

    I'm trying to get Media Protect 2 set up on a new site running on Umbraco 7.6. I've protected a folder and added a few images and PDF files - the PDF files are protected correctly but I can still access the images. The log in the database shows the images as unprotected and the PDF as protected.

    I opened each file in a new private window so there's no previous session cookies. We haven't bought a licence yet so the site is running over localhost.

    I tried adding the <protectCropperImages>true</protectCropperImages> option to the config which worked on older versions of Media Protect but that doesn't seem to have any effect now - is that setting still relevant for Media Protect 2?

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 02, 2017 @ 14:48
    Richard Soeteman
    0

    Hi James,

    Looks like the HTTPModule is not running, see the manual how to fix that. That could cause this issue. Otherwise check the Umbraco log file for errors please.

    Hope this helps,

    Richard

  • james 37 posts 121 karma points c-trib
    Jun 06, 2017 @ 16:07
    james
    0

    Hi Richard,

    The HTTP module is registered in the web.config. The mediaprotect.txt file under App_Plugins/mediaprotect reads "This is a markerfile don't delete" - is that correct?

    I'm not getting any errors in my Umbraco log file, however I have turned on debug logging and get the following two entries for my PDF file and image in the log:

    MediaProtect.HttpModules.MediaProtectModule - Mediaprotect: Request: /media/1002/test.pdf on 06/06/2017 16:57:24, isMedia: True, protected:True, hasAcces:False, redirectPage: /en/login/, nodeId: 1330, user:
    MediaProtect.HttpModules.MediaProtectModule - Mediaprotect: Request: /media/1001/sea.jpg on 06/06/2017 16:57:19, isMedia: True, protected:False, hasAcces:True, redirectPage: , nodeId: 1386, user:
    

    Both of these files are inside the same folder in the media library so they should be inheriting the same media protect permissions, yet the image is flagged as unprotected and the PDF is protected.

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 07, 2017 @ 09:16
    Richard Soeteman
    0

    Hi,

    No that indicates that the HTTPModuel is not running. when it is running properly it returns true.

    Please check that you are running in integrated mode.

    Best,

    Richard

  • blackhawk 313 posts 1368 karma points
    Sep 20, 2017 @ 19:51
    blackhawk
    0

    I have the same situation. I am running Umbraco 7.6.6, and my IIS7 application pool value for my site is set to "Integrated."

    Also this is what my httpModules code looks like in my web.config

        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
            <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
            <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
        </httpModules>
    

    What else can we check to make sure Media Protect has all the prerequisites needed to run?

    Thanks

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Sep 21, 2017 @ 05:30
    Richard Soeteman
    0

    Hi as mentioned on the other thread your HTTPModule is not running an as seen in this snippet it is not in.

    The manual describes how to manually configure the module in this case.

    But if you add

    <add name="MediaProtectModule" type="MediaProtect.HttpModules.MediaProtectModule,
    

    MediaProtect" />

    It should be fine.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft