Licencing is sporadic
Ryan
Posts: 2
Hi,
I've managed to licence the toolkit OK, but it is very problematic. Between different builds I'll get the error;
C:\Inetpub\wwwroot\xxxx\Licenses.licx Could not transform licenses file 'Licenses.licx' into a binary resource. (1) : error LC0004 : Exception occured creating type 'System.Security.SecurityException'
Sometimes, it works, sometimes not. I used to be able to fiddle it by setting CopyLocal on both DLLs being included to various arrangements, but no longer. Now it won't compile at all.
I would not mind once in a while, but it keeps coming back when I've fixed it. Is there an issue within your implementation of the .Net licencing or is it my build environment? I'm using VS 2003.
My licenses.licx file is;
RedGate.SQLCompare.Engine.Database
I'm including RedGate.SQL.Shared and RedGate.SQLCompare.Engine.
Any help would be appreciated.
Thanks
Ryan
I've managed to licence the toolkit OK, but it is very problematic. Between different builds I'll get the error;
C:\Inetpub\wwwroot\xxxx\Licenses.licx Could not transform licenses file 'Licenses.licx' into a binary resource. (1) : error LC0004 : Exception occured creating type 'System.Security.SecurityException'
Sometimes, it works, sometimes not. I used to be able to fiddle it by setting CopyLocal on both DLLs being included to various arrangements, but no longer. Now it won't compile at all.
I would not mind once in a while, but it keeps coming back when I've fixed it. Is there an issue within your implementation of the .Net licencing or is it my build environment? I'm using VS 2003.
My licenses.licx file is;
RedGate.SQLCompare.Engine.Database
I'm including RedGate.SQL.Shared and RedGate.SQLCompare.Engine.
Any help would be appreciated.
Thanks
Ryan
Comments
Microsoft's licence compiler can be troublesome. Do a Google search on lc.exe, and you'll see what I mean!
The only difference in our implementation is that we have a custom licence component (RedGate.Licensing.Client.dll) that runs. This can possible introdice some issues.
Also, I beleive the licensing needs to encrypt your data using RSA encryption, so the error could allude to an RSA machine key being inaccessable. If you have a licence for SQL Compare, try renaming your 'sql compare.lic' file from c:\program files\red gate sql bundle to something else (so you can get it back again by renaming it if your activation doesn't work!) and launch SQL Compare and try to reactivate it.
If that works, then at least you know Microsoft's CryptoAPI is working!
If you have upgraded your SQL Bundle, you may need to re-reference the RedGate.SQLCompare.Engine.dll.
Hopefully this helps.