I'm using Umbraco to create an Intranet. I use the media section for users to upload files which members of the intranet can view. The problem I've got now is that I only want to view the media to members who are logged in. Currently the media can be downloaded by directly going to the url. I know the protected media package might help, but it doesn´t work well for media which is already uploaded. I think my best solution is to create a custom http handler which checks if a member is logged in before the file is processed. This check should be done for everything in the media section. Is this a good solution or are there better suggestions?
Are you using IS7? If So maybe create a custom HTTP Handler that you configure in IIS7 so it gets triggered when you try to request the media and add logic for the security check in that handler?
We're using IIS6. Is there a way to just secure the entire media folder in Umbraco? Can I write a httpHandler which can catch all the files? I got the following example from a colleague:
Protected media in intranet
Hello,
I'm using Umbraco to create an Intranet. I use the media section for users to upload files which members of the intranet can view. The problem I've got now is that I only want to view the media to members who are logged in. Currently the media can be downloaded by directly going to the url. I know the protected media package might help, but it doesn´t work well for media which is already uploaded. I think my best solution is to create a custom http handler which checks if a member is logged in before the file is processed. This check should be done for everything in the media section. Is this a good solution or are there better suggestions?
Jeroen
Hi Jeroen,
Are you using IS7? If So maybe create a custom HTTP Handler that you configure in IIS7 so it gets triggered when you try to request the media and add logic for the security check in that handler?
Cheers,
Richard
We're using IIS6. Is there a way to just secure the entire media folder in Umbraco? Can I write a httpHandler which can catch all the files? I got the following example from a colleague:
Web.config:
Does *.* for the path also works or will this cause other problems?
Jeroen
is working on a reply...