Home

Mediaprotect User manual

image

Contents

1. Example code for the Requesting event lt summary gt public class ProtectedFolderRequest ApplicationBase d lt summary gt Constructor to wire up the requesting event Make sure your class derives from ApplicationBase otherwise this constructor never gets hit lt summary gt public ProtectedFolderRequest lt summary gt Handles the FileRequesting event to check if the user has access lt summary gt private void Request_FileRequesting object sender MediaProtect Library EventArgs FileRequestin Request FileRequesting new Request FileRequestingEventHandler Request FileRequesting gEventArgs e Check if the user request a protected folder and the role of the user if e Path StartsWith protected StringComparison CurrentCultureIgnoreCase amp amp Roles I sUserInRole Subscriber Cancel the event when a user requests a file from the protected folder and is not in the subscriber role e Cancel true Specify the login page MediaProtect will redirect to this page e RedirectPage login Soeteman Software page 17 23 Mediaprotect User manual Version 1 5 5 4 2 Requested event In the example below we increase a counter on the protected media item So you can see how many times a file is requested This event is only triggered on items from the media folder Once a file is requested the following code will look for a proper
2. some browsers ignore these rules O Soeteman Software page 23 23
3. Mediaprotect User manual Mediaprotect User manual Version 1 5 1 INTRODUCTION i55c 50ccsaceausntaccsssesscsacansesssoeseesbannsaueessdesacsacnaee se sesseidsonsadbanessesascocasbece sesstasincas 4 2 INSTALLATION ccccicscccscesscasannsoeasecesessecases casscestsncsbaenousses mesas e rins sdesessescensveoessscesesnesodewedsccssesncete 5 2 1 Postinstall i die eee lie Wn tia det a dian nia ie arta aa 5 3 PROTECT MEDIA sisiiicccccsssevasvcsaveccesesseaties casscesesnsnsuenensses cessannsessdsccesdsnacevunessecsessens eseaescosasnends 7 3 1 ProtectiMedia BEE 7 3 1 1 Single Heer Protection gett eege EE ete dd ee Sie eine 8 3 1 2 Role based protechon nane uria a ie taea ati ai near nana 8 3 1 3 Verity PrOLC CON EE 9 4 LOG PROTECTED FILES REQUESTS ccccseccccccccecssseeeceeeceececscsssececeseseccecssescesseeseesacsseeeeenes 11 5 PIBRARY GE 12 5 1 XSL Ee 12 5 1 1 MediaProtect Library AllowedGroupsS errar earr aereas 12 5 1 2 MediaProtect Library AllowedGroupsS reis rarraaaraananna 12 5 1 3 MediaProtect Library AllowedMembers rentes 12 5 1 4 MediaProtect Library AllowedMembers renata 12 5 1 5 MediaProtect Library GetProtectedNodesForRole reis 13 5 1 6 MediaProtect Library GetProtectedNodesForUser sereias 13 5 1 7 MediaProtect Library HaSACccesS AA 13 5 1 8 MediaProtect Library HaSACcesS AA 13 5 1 9 MediaProtect Library lsProtected AA 13 5 1 10 MediaProtect L
4. dia r Public 4 J Protected db Protected file RecycleBin When you open the media item and click on the link you should be redirected to the page you have specified as the login page If you are already logged in as a website member you should be able to either open the protected media item or being redirected to the not authorized page Soeteman Software page 9 23 Mediaprotect User manual Version 1 5 File i 4 a H Upload file media 29 protec tedfite2 pdf Remove file Choose ER mo rie chosen Type Size When you uploaded a file on a protected content node the file is protected as well Soeteman Software page 10 23 Mediaprotect User manual Version 1 5 4 Log protected files requests During install you can specify if protected files need to be logged when they are requested When you enable logging a new dashboard will be installed in the media section This Dashboard will give you information about which file got requested the Media item User info and when the file was requested You can refresh the overview export to csv or delete all records 25 x File Media item Username User IP Requested on medis 35 protected file pat Protected file rsoetemen 270 01 08 11 2011 17 06 24 O Soeteman Software page 11 23 Mediaprotect User manual Version 1 5 5 Library Media protect comes with a small library that you can use in you xslt and or net libraries to determine if certain items are pro
5. e to the folder umbraco plugins MediaProtect Config Copy ProtectMedia aspx to umbraco plugins MediaProtect Dialogs Copy MediaProtect js to umbraco plugins MediaProtect Scripts Copy all ascx files to the folder umbraco plugins MediaProtect Usercontrols Copy the following files to the folder umbraco plugins MediaProtect o mediaprotect txt o LicenseError aspx o ConfigurationError aspx o ValidatelInstall aspx 7 2 Additional web config configuration 7 2 1 Add the media protect module To protect media you need to add the following snippet to the system webServer modules section in your web config file lt remove name MediaProtectModule gt lt add name MediaProtectModule type MediaProtect HttpModules MediaProtectModule MediaProtect gt 7 2 2 Run all managed modules for all requests setting To make sure the HttpModule gets called during each request set the attribute runAllManagedModulesForAllRequests to true Soeteman Software page 21 23 Mediaprotect User manual Version 1 5 lt system webServer gt lt validation validateIntegratedModeConfiguration false gt lt modules lt remove lt remove lt remove lt remove lt remove runAllManagedModulesForAllRequests true gt name ScriptModule gt name UrlRewriteModule gt name umbracoRequestModule gt name viewstateMoverModule gt name umbracoBaseRequestModule gt 7 3 Add the XSLT Extension If yo
6. er collection 2 f you use a third party media picker which should be added by default send us an email support soetemansoftware nl and we will add it for the next release Soeteman Software page 19 23 Mediaprotect User manual Version 1 5 6 4 Enable disable logging To enable or disable logging set the enableLogging to true false It s also possible to log public files set the logPublicMedia to true to enable logging of public files Override the default export settings by modifying the csvDelimiter and csvStringlndicator attributes 6 5 Disable public access dialog By default the public access dialog on media is enabled if you only use the API to modify members roles you might want to disable the Dialog Set the value of disableMediaProtectDialog element to true when you want to disable the public access dialog on media 6 6 Disable use of returnUrl querystring By default the returnurl is appended to the url example returnurl 2fmedia 2f37 2fprotected_file pdf If you want to disable this set the disableReturnUrl config setting to true 6 7 Default login and error node When you specify default login and error pages these values will be used in the dialog when you protect the node so you don t have to specify them every time 6 8 Enable image cropper protection Cropped images can also be protected using Media protect This is disabled by default since it takes a bit more time To enable set protectCropperlmag
7. es that have access to the media node 3 1 1 Single User Protection When you select single user protection you can specify the username and password The user will be created with the credentials when you select update You can also specify the login page where the website visitor will be redirected to when not logged in And you can specify an error page where the member will be redirected to when the member is not authorized to access the requested file Mediaprotect 1 0 Public access x Set the login and password for this page Login ovat Password toner Login Page Login Delete Choose Error Page Not Authorized Delete Choose Update or Cancel 3 1 2 Role based protection When you select role protection you can specify one or more roles that are allowed to access the media items You can also specify the login page where the website visitor will be redirected to when not logged in And you can specify an error page where the member will be redirected to when the member is not authorized to access the requested file Soeteman Software page 8 23 Mediaprotect User manual Version 1 5 Mediaprotect 1 0 Public access x Pick the roles who have access to this page Employees Administrator Login Page Login Delete Choose Error Page Not Authorized Delete Choose 3 1 3 Verify protection You can recognize a protected media item in the tree or any supported media picker by the no entry sign Media Ji Me
8. es to true Soeteman Software page 20 23 Mediaprotect User manual Version 1 5 7 Manual Installation If you renamed the Umbraco folder or for some reason can t give the installer sufficient rights to create tables in the database or the sufficient rights to modify the following folders bin umbraco you need to install Mediaprotect Manually 7 1 Manual installation of files Open the folder in the zip file Copy the MediaProtect Core dll file to the bin folder of your Umbraco installation Copy the MediaProtect Dal dll file to the bin folder of your Umbraco installation Copy the MediaProtect dll file to the bin folder of your Umbraco installation Copy the MediaProtect Library dll file to the bin folder of your Umbraco installation Copy the MediaProtect Resources dll file to the bin folder of your Umbraco installation When using Umbraco V4 10 copy the MediaProtect MVC dll file to the bin folder of your Umbraco installation When using Umbraco V4 or V6 copy the MediaProtect Events Legacy dll file to the bin folder of your Umbraco installation When using Umbraco V7 copy the MediaProtect Events Legacy dll file to the bin folder of your Umbraco installation Open the umbraco plugins folder Create the folder MediaProtect Open the folder MediaProtect and create the following folders o Config o Dialogs o Scripts o Usercontrols Copy all config from the zip fil
9. filename 5 1 9 MediaProtect Library lsProtected This extension method checks if the media item based on media id and media path is protected for the current logged in user Soeteman Software page 13 23 Mediaprotect User manual Version 1 5 5 1 10 MediaProtect Library lsProtected This extension method checks if the media item based filename is protected for the current logged in user 5 1 11 MediaProtect Library IsProtectedByUserName This extension method returns the username that is allowed to access the media item Only for single user protection Soeteman Software page 14 23 Mediaprotect User manual Version 1 5 5 2 XSLT Sample The following sample only shows the download link if the member is allowed to access the file 5 3 Net Library When you want to use the Library in Net all you need to do is add a reference to the MediaProtect Library dll This will give you access to the above mentioned Library methods and give you the ability to modify protection settings With version 4 7 of Umbraco Razor is supported also When you want to use Razor use the Net Library methods 5 3 1 Protectmedia This methods allows you to protect a media node 5 3 2 AddMembershipUser This method allows a membership user to access the node Only works with Simple protection 5 3 3 AddMembershipRole This method allows a membership role to access the node 5 3 4 RemoveMembershipRoleFromMedia This method removes autho
10. following third party upload packages Multi file upload Desktop Media Uploader Zip Upload Import Media CMSImport Pro related media import option Besides the default Media picker Mediaprotect is compatible with the following third party pickers Multi node tree picker part of UComponents Digibiz Advanced Media Picker Mediaprotect requires IIS6 or IIS7 and is compatible with Umbraco version 4 5 and up Mediaprotect is compatible with SQL Server 2005 2008 Express or SQL CE 4 Umbraco v4 6 only 1 For IIS6 or IIS7 classic mode you need to map Mime types also check the configuration section for more info Soeteman Software page 4 23 Mediaprotect User manual Version 1 5 2 Installation Install the Mediaprotect package using the Umbraco package installer O cre CG gi ses TE developer ievitalling Ue peckage Mediaprotect A Developer e Seca eia Please note Installing a package containing several items and files can take some time Do not refresh lt Data Types the page or navigate away before the installer notifies you the install is completed Macros a bk Packages talline thee dochi 4 Aediap ect pac e eciap ec E Umbraco package Repc Name Mediaprotect Version 1 0 BD Created packages Soeteman Sof br installed packages Manor sein rir install sian More info hito mediaprotec t soetemansof tware nt Install local package License Mediaprotect license de Scripting Files Accep
11. his option you have any questions download the manual or contact our support team Validate configuration settin Your settings are perfect You can always revalidate the page using the umbraco plugins mediaprotect ValidatelnstalLaspx page Since context menu s might not be picked up automatically please logout and login again after install Soeteman Software page 6 23 Mediaprotect User manual Version 1 5 3 Protect media Once the package is installed you can protect your media items 3 1 Protect media items You can protect your media items by navigating to the media section right click on the media folder you want to protect and select Public Access Media Au Media de Public A Protected Create A Move x Delete ti Sort gt 5 o Public access vi Reload nodes Sections d S WE 0O Content Media Users Settings a Developer Members This will open the same dialog you get when protecting content items Mediaprotect 1 0 Public access Single user protection lf you just want to setup simple protection using a single login and password Role based protection lf you wish to control access to the page using role based authentication using umbracos member groups or Cancel Soeteman Software page 7 23 Mediaprotect User manual Version 1 5 Single user protection will protected a media node based on an username and password role based protection allows you to select one or more rol
12. ibrary IsProtected AAA 14 5 1 11 MediaProtect Library IebrotechecdGvllserhame A 14 52 TR lune EE 15 5 3 Nett vince ich e a niet nian ener elias 15 5 3 1 Protectmedia EE 15 5 3 2 eene Ee UE 15 5 3 3 ee ue ee 15 5 3 4 HemovekMembersboboletromMecda AAA 15 5 3 5 HemovekMembersbollsertrom Media 16 5 3 6 Rule VE te e LTE 16 5 3 7 IsProtectedByUserName AAA 16 5 4 EVENTS EEE EE ee lice ee ee cee lace 16 5 4 1 Ier WEE EE 17 5 4 2 REQUEStEC E EE 18 6 sCONFIGURATION cisinscscticcssasiadensnscescesaascennuessstessessdcnssnesedessessdsnsuvessdesdescdentunssedeeseassnensvensegeee 19 6 1 IS Gonfig ratio EE 19 6 2 Media Protect COmfiQguration eiiie a a aR aA aa E EARE AEE S 19 6 2 1 Show images for logged in Umbraco users erraram 19 6 3 Add support for additional media pickers AA 19 6 4 Enable disable lOG ging aiies eessen Ed Zeta b ele EE ech ebe Ee 20 6 5 Disable public access dialog aire I RERA 20 6 6 Disable use of returnUrl querystring ee cence ee eeeeeeeeeeeeeeeeeaeeeeesaeeeeeeaeeeeeseeeaeeeteneaeees 20 6 7 Default login and error node rara E i EE E E nana 20 O Soeteman Software page 2 23 Mediaprotect User manual Version 1 5 7 MANUAL INSTALLATION s5i5 cssces0csenssds os soeasassansntnccosseasisandsde oe soedsasbansndaosessessssacaose se sabaosas 21 7 1 Manual installation of files AA 21 7 2 Additional web config configuration ssssessssesssrresse
13. nfiguration 6 1 IIS Configuration This package is only tested on IIS7 We recommend the use of the integrated pipeline in that case you will be absolutely sure that every request will go through our media protect handler When you want to use this package in classic mode make sure you map all requests via the asp net dll This following article on LearnllS net shows you how to do this http learn iis net page aspx 508 wildcard script mapping and iis 7 integrated pipeline 6 2 Media Protect configuration You can change a few configuration settings in the Mediaprotect config file which can be found in the folder Umbraco plugins Mediaprotect Config 6 2 1 Show images for logged in Umbraco users By default protected images are not shown to Umbraco users When you want to insert a protected media item in the Rich Text Editor you ll see a dead image By setting the showimagesForUmbracoUsers element to true Images will be shown for logged in Umbraco Users Always validate afterwards if the image is really protected by logging out and browsing directly to the image 6 3 Add support for additional media pickers By default the following media pickers are supported and will show the no entry sign on protected media nodes when picking a media item Media Picker Multi node tree picker part of UComponents Digibiz Advanced Media Picker When you want to add an additional media picker you can add the alias of the picker to the media pick
14. nnesrnnnesrnnnesnnnnentennnnnnnnnnnnnnennnnnennnnnnannnnne 21 7 2 1 Add the media protect MOUIC ccceesseeeceeseeeeeeeeeneeseeeeeeeeeaeeeseeeeeeeseeseneeeeeseneeees 21 7 2 2 Run all managed modules for all requests Setting 21 Z Add the XSLT Extension 4 c c20de deca kee iid ads aiiai eaa a aiaa raia i aai aaas 22 TA e Kn 22 TROUBLESHOOTING oi scdssccsesssssnscsosessesdasusosesssecdssaasusveesssosstsdasusesessdosdsacasesbeesesssdsecaswootessense 23 8 1 don t see the MediaProtect package in my media section 0 0 0 eee ee eeeeeeeeeeeeeeteteteeeeteteaeees 23 8 2 get an Invalid License exception rare aaaraea near aa near nanaa 23 8 3 When browse to the file it s still visible on the website 23 8 4 How can I create a login box on my login page rear 23 8 5 Nave another TELE 23 Soeteman Software page 3 23 Mediaprotect User manual Version 1 5 1 Introduction Mediaprotect helps you protect media in the same simple way as you protect documents Once the package is installed and you protect certain media or content nodes the files will be password protected Only authenticated members can open the files otherwise members will be redirected to the login screen Mediaprotect is using the standard ASP NET Membership API so you can use the existing asp net login controls for authentication And you can plug in your own Membership provider Mediaprotect is compatible with the
15. rization for a certain role and node O Soeteman Software page 15 23 Mediaprotect User manual Version 1 5 5 3 5 RemoveMembershipUserFromMedia This method removes authorization for a certain member and node 5 3 6 RemoveProtection This method removes protection for a node 5 3 7 IsProtectedByUserName Determines whether a media node is protected by userName Simpel protection 5 4 Events MediaProtect comes with two events Requesting and Requested The requesting event is triggered before validation occurred and can be used to add custom validation rules The requested event is triggered after a file is validated Below you find two examples how these events can be used Events are wired up exactly the same as Umbraco events are used Create a class that derives from ApplicationBase In the constructor wire up the event The events are available on the MediaProtect Library Request object The event samples below can be downloaded from the MediaProtect site http mediaprotect soetemansoftware nl documentation aspx O Soeteman Software page 16 23 Mediaprotect User manual Version 1 5 5 4 1 Requesting event In the example below we protect a custom folder on disk Only members in the role Subscriber can download something from that folder When the member doesn t belong to that role cancel will be set to true and MediaProtect will block the request and redirect to the specified RedirectPage lt summary gt
16. t license pi Accept icense XSLT Files E k Read me Mediaprotect helps you protect media files in the same simple way as you protect documents Once the package is installed and you protect certain media or content nodes the Mes in protected nodes will be password protected IMPORTANT This installer will need modify rights to folders bin umbraco and config folder and also needs to be allowed to create tables in the database For a manual installation read the documentation Binary files in the package Read more D m Instat Package Sections m 2 O Comex Vota Utere tmp Deve loge Meeter Make sure that the installer has modify rights on the following folders e bin e App Data e umbraco The installer also needs rights to create tables in the database If for some reason you can t give the installer these rights you can install the package manually Read the chapter manual configuration how to do this 2 1 Postinstall Once the package is installed it will validate the settings It should say that your settings are perfect in any other situation see the chapter Troubleshooting O Soeteman Software page 5 23 Mediaprotect User manual Version 1 5 Install package Thank you for installing Mediaprotect With media protect you can protect media as easy as you protect documents Just right click on the media node and select the protect option You might need to logout and login again after install to see t
17. tected or who has access to those items 5 1 XSLT Library 5 1 1 MediaProtect Library AllowedGroups This extension method returns all roles that have access to the certain Media Item based on media id and media path 5 1 2 MediaProtect Library AllowedGroups This extension method returns all roles that have access to the certain Media Item based on the filename 5 1 3 MediaProtect Library AllowedMembers This extension method returns all members that have access to the certain Media Item based on media id and media path Only for single user protection 5 1 4 MediaProtect Library AllowedMembers This extension method returns all membersthat have access to the certain Media Item based on the filename Only for single user protection Soeteman Software page 12 23 Mediaprotect User manual Version 1 5 5 1 5 MediaProtect Library GetProtectedNodesForRole This extension method returns all Root media nodes that are protected by the specified role 5 1 6 MediaProtect Library GetProtectedNodesForUser This extension method returns all Root media nodes that are protected by the specified username Only for single user protection 5 1 7 MediaProtect Library HasAccess This extension method checks if the current logged in user has access to a media item based on media id and media path 5 1 8 MediaProtect Library HasAccess This extension method checks if the current logged in user has access to a media item based on the
18. ty alias downloadCounter When it finds the property it will increase its value with 1 lt summary gt Sample code to implement a download counter on your media items lt summary gt public class DownloadCounter ApplicationBase d lt summary gt Constructor to wire up the requesting event Make sure your class derives from ApplicationBase otherwise this constructor never gets hit lt summary gt public DownloadCounter Request FileRequested new Request FileRequestedEventHandler Request FileRequested lt summary gt Handles the File requested event lt summary gt private void Request_FileRequested object sender MediaProtect Library EventArgs FileRequestedE ventArgs e Check if we have a valid media id if e Mediald 0 Get the media item Media mediaItem new Media e Mediald Media item exists if mediaItem null Get the downloadCounter from the mediaItem Property downloadCounterProperty mediaItem getProperty downloadCounter if downloadCounterProperty null Property exist get the current value int current 0 int TryParse downloadCounterProperty Value ToString out current Increase current value with 1 current Store the new value downloadCounterProperty Value current Save the media item mediaItem Save Soeteman Software page 18 23 Mediaprotect User manual Version 1 5 6 Co
19. u want to use the Library methods in Xslt You need to configure the Xslt extension also Add the following line to the config xsltExtensions config file lt ext assembly MediaProtect Library type MediaProtect Library Library alias MediaProtect Library gt 7 4 Add the license file When you bought a license for MediaProtect you can store the lic file into the Bin folder of your Umbraco install and the trial message should disappear Soeteman Software page 22 23 Mediaprotect User manual Version 1 5 8 Troubleshooting 8 1 don t see the MediaProtect package in my media section Try logging out and an IIS reset to force rebuilding of the Umbraco tree 8 2 I get an Invalid License exception Make sure you ve bought the correct license for the sub domain or an enterprise license Contact support soetemansoftware nl for help 8 3 When I browse to the file it s still visible on the website Make sure the file is protected in either the media or content section and make sure the file doesn t exist in the cache of the browser 8 4 How can I create a login box on my login page Mediaprotect is using the standard ASP NET Membership API so you can use the default asp net login controls which can be found at http msdn microsoft com en us library ms178329 aspx 8 5 Ihave another question If you have any question please email us at support soetemansoftware nl we love to help you 3 Even though we force not to cache pages

Download Pdf Manuals

image

Related Search

Related Contents

グリップヒーターキット 組付・取扱説明書 適応機種  41063-230_2_4 [Converted].ai  Action 3 Junior User Manual 10123    Panasonic Toughbook CF-52  超音波診断装置の安全性に関する資料  Télécharger le manuel d`installation et de maintenance  取扱説明書品番:/SE-025A    

Copyright © All rights reserved.
Failed to retrieve file