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?
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.
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?
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.
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:
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
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?
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
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.
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?
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.
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.
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.
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!
Hi Jordan,
Media protect should work fine on your environment. Make sure that
Hope this helps,
Richard
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
Is runAllManagedModulesForAllRequests="true" attribute set on Modules? element of web.config?
Yes it is indeed.
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?
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.
Was there a solution for this problem? I'm having the exact same issues.
Kind regards,
-Ferdy
Sure it's registered in web.config Ferdy? and tried the url I mentioned above?
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
Hi Ferry,
Strange but could you add the following line to the /umbraco/plugins/mediaprotect/config/mediaprotect.config file
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
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
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
Thanks Richard,
could you just check the file path to dropbox ? it gives me 404.
This is the link
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
Still no luck :(
When I was installing 1.6.1 I got this in UmbracoTraceLog:
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
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?
Yes, it's there
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
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:
Thanks,
James
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
What type of file and did you try teh steps above?
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?
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
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.
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?
Must be something small. But hope this helps already.
/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.
weird,
Can you send an email to [email protected] then I'll reply in the mail.
Best,
Richard
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.
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.
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
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
is working on a reply...