1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Extending Telerik.Zip licence error

Extending Telerik.Zip licence error

6 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    29 Nov 2009
    Link to this post
    Hi,

    During custom configuration to extend Telerik.Zip to allow CopyTo and encryption i have one licence xceed limitation. Actually I working to manage incrementials backups and need to modify the files attributes after and before add to zipArchive. I need to acomplish managing the file attributes and add files individually to the zip archive. I have used original classes overriding telerik.Zip but one licence is demanded. Exist some way to extend Telerik.Zip methods or found the licence in the distribued sf solution like nolics. Of course, Is extending sf not outside.

    Telerik.Zip not expose Encryptions Methods found in base
    Telerik.Zip AbstractFile not expose CopyTo (add file to zip ) found in base

    Best regards

    Romi

    FileAttributes fileAttributes; 
                DirectoryInfo di = new DirectoryInfo(sourceDirectory); 
                Xceed.FileSystem.AbstractFile file = new DiskFile(zipPath); 
                if (file.Exists) 
                    file.Delete(); 
                Xceed.Zip.ZipArchive archive = new Xceed.Zip.ZipArchive(file); 
                archive.DefaultEncryptionPassword = "xxxxxxx";//password 
                archive.DefaultEncryptionMethod = EncryptionMethod.WinZipAes; 
                archive.DefaultEncryptionStrength = 256
                 
                Xceed.FileSystem.AbstractFolder source = new DiskFolder(sourceDirectory); 
                //FileInfo[] files = di.GetFiles("*", SearchOption.AllDirectories); 
                Xceed.FileSystem.AbstractFile[] files = source.GetFiles(true, new NameFilter("*.*")); 
                foreach (Xceed.FileSystem.AbstractFile item in files) 
                { 
                    if (bcktyp == BackupType.Incremental) 
                    { 
                        // get the attibutes 
                        fileAttributes = File.GetAttributes(item.FullName); 
     
                        // check whether a file has archive attribute 
                        bool isArchive = ((File.GetAttributes(item.FullName) & FileAttributes.Archive) == FileAttributes.Archive); 
                        // if the archive bit is set then clear it 
                        if (isArchive) 
                        { 
                            //add to the archive file 
                            item.CopyTo(archive, true); 
                        } 
                    } 
                    else 
                    { 
                        // add to the archive file 
                        item.CopyTo(archive, true); 
                    } 
                    // clear the bit we archived it  
                    File.SetAttributes(item.FullName, FileAttributes.Normal); 

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    01 Dec 2009
    Link to this post
    Hi Pierre,

    Thank you for using our services.

    I looked up in the issue and I unfortunately I have to say that our license agreement with Xceed does not allow us to redistribute the Xceed.Zip code library. The possible ways for getting this to work would be either obtaining a license from Xceed, use an open source library that has similar functionalirty, or use a similar approach as in the following Code Library thread - Batch Download Of Library Items. You will have to first put all files you want to zip in a temporary directory and then zip them using at the end using the existing functionality of the Telerik.Zip.Manager.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    01 Dec 2009
    Link to this post
    Hi Team,

    Sniff,..You have integrated a good component but only exposed your needs to load zipped files. In this work i don´t load files but backup files from sf solution using incremental or differential methods.
    I think that some classes like CopyTo and Encryptions in ZipArchives methods must be exposed in the Telerik.Zip class. Telerik. Zip is a real need to backup the files of sf solutions. Yes others free solutions exist but i have overloaded my bin folder and the solution is now inside, but need some minor work to expose.
    Could you suggest to expose to Telerik.Zip others methods or embed the licence in header of ZipManager to allow user to use the potential that is included in sf solution?

    Regards
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Dec 2009
    Link to this post
    Hi Pierre,

    I understand your concerns. As I mentioned in my previous post this is something that concerns our license agreement with Xceed. I will suggest this to our team, however I cannot promise any positive results as this is not a decision that can be made so easily.

    I will get back to you in this thread if we decide to expose those methods.

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    02 Dec 2009
    Link to this post
    Hi Radoslav,

    I have dev one complete backup system including database and zipped folders. I have some others arguments to suggest you to extend telerik.zip base classes. For sample, I have created one complete admin backup system outside the admin page system to allow in case of shutdown to connect and recuperating the backups in place by restoring or transfer by FTP to external machine. In case of FTP transfer, i need implement one encryption to protect externals attempts to my server. The telerik.Zip can easily allow this implementation allowing encrypt using the licensed base. Actually i have stopped my work with FTP transferring not crypted and zipped backups not incremential but all potentialities are there with no more work for you other that expose throw Telerik.Zip.

    Cheers, Romi.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Dec 2009
    Link to this post
    Hi Pierre,

    As I said in my previous post I would talk to the team and see what we can do about it. I did talk to the team and got a word that the Telerik.Zip would be extended to implement these methods, however I cannot give you a time frame for this.

    Just to let you know that with Sitefinity 4.0 we are moving away from using Xceed and we are going to use an open source class library for the Zip functionality.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered