Copied to clipboard

Flag this post as spam?

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


  • Jordan Lane 28 posts 130 karma points c-trib
    Aug 27, 2014 @ 12:06
    Jordan Lane
    0

    Media protect not blocking access on Umbraco 7.1.4

    Hi there,

    I'm running Umbraco version 7.1.4 assembly: 1.0.5261.28127 locally with IIS 8.5 and installed media protect which seemed to work fine. However after protecting media (both individual files and folders) none of them have restricted access.

    If I try and open a file which doesn't exist I see the IIS 404 page saying that its using the StaticFile handler, not sure if thats the expected behaviour or not?

    Any help would be appreciated.

    Thanks!

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 27, 2014 @ 12:12
    Richard Soeteman
    0

    Hi Jordan,

    Media protect should work fine on your environment. Make sure that

    1. Your site is running in integrated mode
    2. Make sure the HTTP Module is configured. Check the troubleshooting area of the manual how to set-up.

    Hope this helps,

    Richard

  • Jordan Lane 28 posts 130 karma points c-trib
    Aug 27, 2014 @ 12:25
    Jordan Lane
    0

    Hi Richard,

    Thanks for the quick response!

    1. The site is running in integrated mode.

    2. I've looked in the troubleshooting section of the manual and it doesn't seem to mention the HTTP module, I did check that the appropriate modifications had been made to the web.config which they had.

    In the modules section it appears to be registered: http://gyazo.com/8ef5f544d7d37946d515b62a548ad73b ;

    Thanks

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 27, 2014 @ 12:53
    Richard Soeteman
    0

    Is runAllManagedModulesForAllRequests="true" attribute set on Modules? element of web.config?

  • Jordan Lane 28 posts 130 karma points c-trib
    Aug 27, 2014 @ 12:56
    Jordan Lane
    0

    Yes it is indeed.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 27, 2014 @ 12:59
    Richard Soeteman
    0

    Weird running the exact same config without issues. The url /umbraco/plugins/mediaprotect/mediaprotect.txt should return true in any other case the module is not running. Can you check if it returns true?

  • Jordan Lane 28 posts 130 karma points c-trib
    Aug 27, 2014 @ 13:33
    Jordan Lane
    0

    It is strange, that does return true.

    I just tried uploading a new media item under a protected folder and still had the same issue, just opens the file straight away.

  • Ferdy Hoefakker 214 posts 248 karma points
    Jul 09, 2015 @ 13:53
    Ferdy Hoefakker
    0

    Was there a solution for this problem? I'm having the exact same issues.

    Kind regards,

    -Ferdy

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 10, 2015 @ 05:05
    Richard Soeteman
    0

    Sure it's registered in web.config Ferdy? and tried the url I mentioned above?

  • Ferdy Hoefakker 214 posts 248 karma points
    Jul 10, 2015 @ 07:09
    Ferdy Hoefakker
    0

    Hi Richard,

    I have <modules runAllManagedModulesForAllRequests="true"> in system.webserver which in turn contains <remove name="MediaProtectModule" /> <add name="MediaProtectModule" type="MediaProtect.HttpModules.MediaProtectModule, MediaProtect" />

    Also, the url does indeed return true for me. I checked if it might have been a caching issue, but on different computers that have never accessed the specific files, I can also access it without logging in.

    -Ferdy

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jul 11, 2015 @ 04:52
    Richard Soeteman
    0

    Hi Ferry,

    Strange but could you add the following line to the /umbraco/plugins/mediaprotect/config/mediaprotect.config file

    <debugMode>true</debugMode>
    

    Then request the item this should log info about the request into ~/app_data/mediaprotectdebuglog.xml can you mail that file to [email protected] ?

    Thanks,

    Richard

  • Pawel Bres 39 posts 160 karma points c-trib
    Sep 08, 2015 @ 11:32
    Pawel Bres
    0

    Hi Richard, any progress on that ?

    I have same issue and in debug file thre is

    file dateTime="2015-09-08 13:27:27" path="/media/1039/mediaprotect-manual-1.pdf" isMedia="True" isProtected="False" hasAccess="True" redirectPage="" nodeId="19880" user=""

    Even when in media section this file is under protection. Also accessing /umbraco/plugins/mediaprotect/mediaprotect.txt file returns true.

    PS. Umbraco version 7.2.8 assembly: 1.0.5675.23466

    All the best, Pawel

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 08, 2015 @ 11:39
    Richard Soeteman
    0

    Hi Pawel,

    Can you check with this version. We found that not all dll's got loaded correctly. Still testing but seems to fix this issue https://www.dropbox.com/s/o0r9udu2pdlde76/MediaProtect16.1.zip?dl=0

    Hope this helps,

    Richard

  • Pawel Bres 39 posts 160 karma points c-trib
    Sep 08, 2015 @ 11:46
    Pawel Bres
    0

    Thanks Richard,

    could you just check the file path to dropbox ? it gives me 404.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 08, 2015 @ 11:48
  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Sep 08, 2015 @ 11:53
    Dennis Aaen
    0

    Hi Richard and Pawel,

    I have created an issue for broken url´s in posts with you are using underscore. See this issue on the tracker

    http://issues.umbraco.org/issue/OUR-315

    /Dennis

  • Pawel Bres 39 posts 160 karma points c-trib
    Sep 08, 2015 @ 14:05
    Pawel Bres
    0

    Still no luck :(

    When I was installing 1.6.1 I got this in UmbracoTraceLog:

    2015-09-08 15:32:07,508 [10] INFO umbraco.BusinessLogic.Log - [P4180/T49/D45] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: MediaProtect Error validating /umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds : System.MissingMethodException: Method not found: 'Boolean umbraco.GlobalSettings.getUseMediumTrust()'. at MediaProtect.Helpers.TypeResolver.GetAssignablesFromType[T](String[] files) at MediaProtect.Helpers.TypeFinder.FindClassesOfType[T](Boolean useSeperateAppDomain, Boolean onlyConcreteClasses) at MediaProtect.PreRequest.PreRequestFactory.() at MediaProtect.PreRequest.PreRequestFactory.Execute(HttpContext context) at MediaProtect.HttpModules.MediaProtectModule.(Object , EventArgs ) 2015-09-08 15:32:07,508 [10] INFO umbraco.BusinessLogic.Log - [P4180/T49/D45] Redirected log call (please use Umbraco.Core.Logging.LogHelper instead of umbraco.BusinessLogic.Log) | Type: Error | User: 0 | NodeId: -1 | Comment: MediaProtect Error validating /umbraco/developer/packages/installer.aspx : System.MissingMethodException: Method not found: 'Boolean umbraco.GlobalSettings.getUseMediumTrust()'. at MediaProtect.Helpers.TypeResolver.GetAssignablesFromType[T](String[] files) at MediaProtect.Helpers.TypeFinder.FindClassesOfType[T](Boolean useSeperateAppDomain, Boolean onlyConcreteClasses) at MediaProtect.PreRequest.PreRequestFactory.() at MediaProtect.PreRequest.PreRequestFactory.Execute(HttpContext context) at MediaProtect.HttpModules.MediaProtectModule.(Object , EventArgs )

    I also tried to install it manually but the result is the same, files are accessible with no problem.

    Can you tell me how you are storing info about protected files ? Maybe then I could check if it got stored correctly.

    Thanks,

    Pawel

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 08, 2015 @ 14:08
    Richard Soeteman
    0

    Hi Pawel,

    How is your hosting envrionment set-up, I assume you are using full trust and integrated mode and also using sql server?

    Is the Mediaprotect.MVC dll in your bin folder?

  • Pawel Bres 39 posts 160 karma points c-trib
    Sep 08, 2015 @ 14:21
    Pawel Bres
    0

    Yes, it's there

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 08, 2015 @ 14:24
    Richard Soeteman
    0

    If you can share your complete environment Website + database and send it to [email protected] I can have a look in debug mode.

    Best,

    Richard

  • james 37 posts 121 karma points c-trib
    Feb 17, 2016 @ 15:40
    james
    0

    Hi Richard,

    Sorry to bump this thread up, but I think I'm running into the same problem on Umbraco 7.4. I've just installed Media Protect 1.6.2 via nuget, protected a folder in the media library (and the files within that folder) but I'm finding that the images aren't protected.

    I've checked against the various steps above but with no luck. Here's what gets written to the debug log when I try to access a protected file:

    <file dateTime="17/02/2016 15:38:20" path="/media/1009/800x460.jpg" isMedia="True" isProtected="False" hasAccess="True" redirectPage="" nodeId="0" user="" />
    

    Thanks,

    James

  • Sunnefa 22 posts 41 karma points
    Mar 30, 2016 @ 11:01
    Sunnefa
    0

    Same here, I'm not even getting anything in the log but logging is enabled... I've installed the license file and that seems to be valid and the protection window come up and I can add protection but nothing else seems to work. I'm using Umbraco version 7.2.7 assembly: 1.0.5674.21649

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 30, 2016 @ 11:05
    Richard Soeteman
    0

    What type of file and did you try teh steps above?

  • Sunnefa 22 posts 41 karma points
    Mar 30, 2016 @ 11:25
    Sunnefa
    0

    Hi, I double checked the web.config and everything looks right there. The file I'm trying to view is an image with the image cropper. I set "protectCropperImage" to true but it didn't change anything.

    I didn't find out how to put media protect in debug mode though, how do I do that?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 31, 2016 @ 05:22
    Richard Soeteman
    0

    Are you logged in as Umbraco User and have you set showimagesforumbracouser also to true? Then it makes sense since that will display the images when you are logged in in the backoffice

  • Sunnefa 22 posts 41 karma points
    Mar 31, 2016 @ 09:12
    Sunnefa
    0

    I have "showimagesForUmbracoUsers" set to false and I've tried in incognito mode as well with no luck. This is getting frustrating as we've paid the 99€ for this product and then we find out it doesn't work.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 31, 2016 @ 11:30
    Richard Soeteman
    0

    Sorry to hear it didn't work. Currently recovering from the flu so sorry for delay in replies. works 99 out of 100 times but the 1 time it doesn;t work can simetimes be a puzzle sorry about that. Since this is an old thread you are answering to can you check the result of url /umbraco/plugins/mediaprotect/mediaprotect.txt Does that reurn True?

    And if it does return true can you add the following key to web.config file?

    <add key="MediaProtect.UseSeparateAppdomain" value="true" /> 
    

    Must be something small. But hope this helps already.

  • Sunnefa 22 posts 41 karma points
    Mar 31, 2016 @ 12:51
    Sunnefa
    0

    /umbraco/plugins/mediaprotect/mediaprotect.txt returns true.

    What key to the web.config? Can you send it again as it doesn't seem to have come through in your post. Thanks for the answers.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 31, 2016 @ 12:58
    Richard Soeteman
    0

    weird,

    Can you send an email to [email protected] then I'll reply in the mail.

    Best,

    Richard

  • Sunnefa 22 posts 41 karma points
    Mar 31, 2016 @ 14:08
    Sunnefa
    0

    Adding that key seems to have worked, at least now I get to the front page sometimes when viewing images that I know are supposed to be protected. Thanks for the answers, I will let you know if it doesn't work anymore.

  • Shannon Deminick 1524 posts 5270 karma points MVP 2x
    Jun 28, 2016 @ 11:11
    Shannon Deminick
    0

    The solution for me was that i had to set this in the config for media protect:

    <protectCropperImages>true</protectCropperImages>

    by default this value is false yet Umbraco by default ships with the media image as the cropper now.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jun 28, 2016 @ 13:30
    Richard Soeteman
    0

    Image cropper to true works for images in cropper now indeed. But it's a bit slower therefore always set to false out of the box. V2 will be using an Examine index instead of database. Then the Image cropper setting will be obsolete and all will work out of the box. Should be out soonish.

    Best,

    Richard

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Nov 03, 2016 @ 16:39
    Richard Soeteman
    0

    HI All,

    To hopefully end this long thread. I've released V2 of Mediaprotect that doesn't have the version depended loading of dll's and indexes data so much faster access even for Image cropped items.

    Hope this helps,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft