I have a colleague who is looking for a product that can encrypt the C/AL code within his own solution objects in NAV 2013 R2 ... we know that this is possible with a 3rd party app. (it is actually in the download section of this forum) .. however the problem is that only up to NAV2009 as it relies on files such as CFront.dll etc. all from the 'Classic' folder .. of course these no longer exist in 2013 R2 as the Classic client was retired.
So ... can anyone recommend a reliable method for 2013R2 ..?
0
Comments
As C/AL is a Pascallish language I'd suggest you're better off converting the bits of your code that are so special that everyone will want to copy them into a DotNET hosted version of Pascal and use the DotNET interop to run them.
Don't forget to use the Dotfuscator to make sure that your super secret code cannot be reversed from the DotNET MSIL.
TVision Technology Ltd
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Basically, you delete the C/AL code in the object and leave the P-Code that used to be run by the classic client (if it's still there).
The C# code is in the "Object metadata" table and IF nothing happens to trigger a regeneration of the C# code the service tier will continue to use the code that was generated when the object was saved.
The C# code is stored (compressed) in the fob file so when a fob is imported (IF the versions match exactly) it can just be copied into the metadata table without actually being regenerated. (This makes FOB imports almost as fast as in V5)
Still it's all very fragile, and as I said the C# code isn't really all that unreadable after all that, and it would probably not be too difficult to write some program that regenerates the C/AL code from the C# code. It would be a bit tedious but the translation looks like a direct one without any sort of optimisation; that comes later.
TVision Technology Ltd