Click here to Skip to main content
15,881,644 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
Hey guys, I have created a program which is generating an encrypted license file *.lic, now I am working on a
RIAServicesLibrary 
which will be implemented in software to check,read(decrypt, encrypt) and display data in lic file. Right now I am using
LicenseManager
class to validate license, and I need help on reading, displaying data from file. Any advices? So far I got only this

C#
[LicenseProviderAttribute(typeof(LicFileLicenseProvider))]
    public class LicensedClass : IDisposable
    {
        private License license = null;

        public LicensedClass( TextBox tex,TextBox tex2)
        {


            license = LicenseManager.Validate(typeof(Form1), this);

            tex.Text=("License is Valid");
        }

        public void Dispose()
        {
            if (license != null)
            {
                license.Dispose();
                license = null;
            }
        }
    }
this is WindowsFormApplication, but I am planning to use this code in my dll. Any help is welcome.
Posted

1 solution

My advice is that you must use hashed data in your .lic. Because if you can decrypt the encrypted data anyone can decrypt it. So, you have a security issue there.

Remember that in silverlight isn't recommendable to read file from client PC. May be this class help you in server & client scenario for Silverlight: AesManaged

Hope it helps in any way.
 
Share this answer
 
v2
Comments
Christian Amado 21-Aug-12 15:11pm    
What part? Sergey
Nicorette 22-Aug-12 2:13am    
Lic file is not in clients computer, it is on server in main's application ClientBin folder. I am using AesManaged in license generating application to encrypt and decrypt data in lic file. So how should I proceed in reading and displaying data?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900