How to create a license key file
acjagacjag
Posts: 9
How to create a license key file/redistributable package for the Redgate API dlls. Suppose I want to run the application (which uses the Redgate API dlls) in another machine requires the RedGate installation in the target machine.
Can we create any license key file for API dlls? Please let me know the documents regarding the same if available.
Thanks in Advance.
Can we create any license key file for API dlls? Please let me know the documents regarding the same if available.
Thanks in Advance.
Comments
If you have problems this article ( http://www.red-gate.com/supportcenter/Content.aspx?p=SQL%20Comparison%20SDK&c=knowledgebase%5cSQL_Comparison_SDK%5cKB200710000160.htm ) has more information.[/url]
RedGate.SQLDataCompare.Engine.ComparisonSession, RedGate.SQLDataCompare.Engine
RedGate.SQLCompare.Engine.Database, RedGate.SQLCompare.Engine
But this still fails to execute. I am using the API dlls in a web application, which works in the machine where RedGate toolbelt installed. But it doesn't work if RedGate toolbelt not installed in a machine.
I am using the DataCompare version 7.1.0.230
Any help welcome.
Thanks in advance.
From the knowledge base article I linked above
"Don't copy the licenses.licx file from another folder manually, for instance using a command prompt or Windows Explorer. It should be added as a new item at the Visual Studio project level with a build action of "Embedded Resource"
In order to check that the licx file is correctly included you can use reflector
"If a licence file produced as the result of a successful activation is present on the build computer, the build will silently succeed. To double-check that your assembly has been licensed successfully,
you may use a tool such as .NET Reflector (http://reflector.red-gate.com/download.aspx), open your assembly, expand 'resources', locate a resource called <YourAssemblyFileName>.licenses, view the resource, and make sure that the resource contains 'RedGate.SQLCompare.Engine.Database' and also 'RedGate.SQLDataCompare.Engine.ComparisonSession' if you had also referenced the Data Compare Engine in your project."
Since web applications are compiled dynamically, this creates a problem when trying to licence assemblies. We usually recommend simply separating the SQL SDK functions into their own dll so that you can licence it the "normal way" as described above, but I think you can actually create a satellite dll and refernece it from your web app code. I'm testing that theory out as we speak. I'll post a reply if my theory works out.
http://www.red-gate.com/supportcenter/C ... 000160.htm
As it says “The recommended workaround for licensed customers is to move all SQL Comparison API functions into a stand-alone class library project, then reference that dll from your web application.â€
I created a dll which will have all the functionalities.. and I referencing the dlls (and necessary API dlls) and calling the method. But it still throws error.
Let me know if any one found the way…
Thanks in Advance...
I hope that this works for you.
- Are you in your trial period for the SDK. (Do you get nag dialogs appearing when running the application locally)
- What is the error which is thrown on failure
This will work. The bin folder will contain [standalone dll].licenses which is important.
Thanks and apologize for the delay.
I think that you have a choice -- you can either licence the whole web application by creating the satellite dll, or presumably create the .licenses file and have ASP .NET dynamically compile it in (I haven't tried that one).
The other option is to create a dll containing only the functions from the Comparison SDK, and let Visual Studio embed the licence resource into the dll according to the instructions in the help file.
If you go about the second way, you can verify that the licensing was successful by opening the assembly with .NET Reflector and looking for a resource called YourAssembly.dll.resources. This must also match the assembly name in a case-sensitive fashion.
My serial number is stored as hex in the compiled code, is there any way to mask or obfuscate it?
Using an obfuscator like SmartAssembly may work, as it encrypts resources.