View previous topic :: View next topic |
Author |
Message |
jmaynor Guest
|
Posted: Fri Aug 19, 2005 12:22 pm Post subject: Generating a licx file. |
|
|
I have developed a very handy little configuration component for .NET. It is a single dll thet is 'secured' through it's main class ConfigManager. The component has no UI and works equally well in ASP.NET as in WinForms. Licensing violations are handled by throwing an exception, so I do not have a 'screen' to enter the license informtion.
I have added the appropriate Infralution code to the key methods, but cannot test it, because I am not certain how to generate licx files with the appropriate info in them.
How do I generate an LICX file to test with? I am using the demo version. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Aug 19, 2005 11:05 pm Post subject: |
|
|
There are two seperate issues:
1. The ".lic" file contains the license key which your application reads and authenticates. This file is named by the fully qualified name of the type you are licensing eg "MyNamespace.MyType.lic". You can create this file manually and place it in the bin directory with your DLL. It just contains the key as generated by the Key Generator. If you don't want your customers to have to do this manually you can create a seperate installer program which references your DLL and uses the Infralution LicenseInstallForm to do this. Alternatively you could display the licensing form from your DLL for windows forms apps (instead of just raising the exception). You can check the Environment.UserInteractive flag to see if your DLL is being called from a Windows Forms app or an ASP app.
2. The "licenses.licx" file that the user includes in their VisualSudio project to tell the compiler to include a runtime license in their application resources. If your component or control is added using the designer then Visual Studio will generate the entry in the licenses.licx file automatically. In your case the user will have to add the entry manually. To do this simply add a line in the file like:
MyNamespace.MyType, MyDLL
where the first part is the fully qualified type name and the second part is the name of the DLL (minus the DLL extension). Visual Studio adds some extra stuff following this - but it is not really necessary. _________________ Infralution Support |
|
Back to top |
|
|
|