SLP Code Protector Discussion For conversations regarding usage of Code Protector and issues pertaining to SVM protected code.
InishTech Support Forums > SLP Code Protector Discussion > framework 4.0 support Login to add this as a favourite.
User avatar
Member
Member
MultiwebTrader - 7/5/2010 3:16:39 AM
   
framework 4.0 support

We got this error

Error Protection failed, Permutation assembly Microsoft.Licensing.Permutation_6170f_4.0 was not found in permutation 6170f1e9-b757-49f8-9848-27da771a6144

I guess it is due to the fact we're using framework 4.0 which is not currently supported yet. The problem is we're using obfuscator tool that can work on 4.0. Though the code we try to protect is still 2.0

When do we expect to see slp support of framework 4.0, with the understanding it can only protect 2.0 to 3.0 dotnet code.

Thanks

 


User avatar
InishTech Dev
InishTech Dev
RBartelink - 7/5/2010 1:25:59 PM
   
RE:framework 4.0 support

Hi, 

 

Although Code Protector will reject assemblies marked as requiring 4.0, if you set the target framework to 2.0 (i.e., via Project|Properties|Application|Target Framework, select 2.0,3.0 or 3.5) for assemblies that you wish to protect, the code protection will work correctly (even if they were generated by the VS2010 / C# 4.0 / .NET 4.0 toolset).

Such assemblies targeting the 2.0 framework (inc 3.0, 3.5) should transparently load into framework 4.0 processes cleanly.

The main things this leaves off-limits are 4.0-specific things like dynamic etc. For cases where you absolutely must have the assembly marked as 4.0 (e.g., the main .EXE if you dont want to get into complex config settings resupportedRuntime redirections etc.), or where you need to use 4.0-specific constructs, the best approach is generally to extract the pieces that need to be protected into a separate project/assembly (targetting 3.0/3.0 or 3.5)

 

Our current intention is to do a single refresh release of the Code Protector SDK that will offer complete 4.0 framework support (also handling usage of 4.0 specific constructs such as dynamic etc.), rather than having an interim release that claims to support it but then proceeds to reject various constructs as it meets them.

We do not have a published timeline around this at present.

Do you feel this approach is workable for you? If not, please contact us - we'd like to talk through the issues you are experiencing with the aim of getting you moving as quickly as possible.

Regards,

--Ruben


User avatar
Member
Member
MultiwebTrader - 7/5/2010 2:25:52 PM
   
RE:framework 4.0 support

The third party tools and the obfuscated tools that we're using all have the ability to target 4.0, though some of them are actually still use pre-4.0 codes. The debugged version that we have from one of the vendors is targeting at 4.0 framework as well.

For us to dropdown to 3.5 or lower, we will have to reinstall the tools, lose the ability to debug into third party tool etc.

While we appreciate what Inish is trying to do (we're still waiting for Generic support), it should be a quick change to have a version that can target framework 4.0, this is especially true since you have no target date for the 4.0 release anyway.

Please release a version that can support 4.0 ASAP.

>> interim release that claims to support it but then proceeds to reject various constructs as it meets them <<

This is the same situation in the current 3.5 sp1 since it will reject any Generic constructs.

 


User avatar
InishTech Dev
InishTech Dev
josullivan - 7/29/2010 9:26:05 AM
   
RE:framework 4.0 support

In response to customer inputs we have decided to take a phased approach to the delivery of 4.0 support in SLP Code Protector.

As mentioned elsewhere in the Forums we are currently on target to deliver Generics support in Code Protector by the scheduled end Q3 deadline.

In this release we now plan to include the capability to target 4.0 assemblies with Code Protector, where such assemblies do not use 4.0 specific constructs e.g. Dynamic

We will focus on supporting the protection of 4.0 specific constructs in subsequent Code Protector releases.


User avatar
InishTech Dev
InishTech Dev
josullivan - 10/21/2010 3:41:50 PM
   
RE:framework 4.0 support

A new version of Code Protector (3.0.1912) was released today - 21st October - with support for .NET Framework 4.0.

Please see the following Product Update for more details:

http://www.inishtech.com/Support/DevNet/Product-Updates/Code-Protector-Update.aspx


User avatar
Member
Member
Wolfgang - 10/22/2010 4:06:32 PM
   
RE:framework 4.0 support

Hi,

I could properly install the new version on my WindowsXp host system on which .NET3.5/VS2008 along with the .NET4 Redist pack is installed.

Unfortunately, the SLP CodeProtector installation fails within our .NET4 Development environment (VirtualBox Image with WindowsXp as OS and .NET4/VS2010 installed) when calling Slps.Runtime.Configuration.exe .

After that I copied the SLP installation folder from my host PC to my VirtualBox image and tried to run Slps.Runtime.Configuration.exe from an Administrator command prompt with the following result:

C:\Program Files\InishTech SLP Code Protector>Slps.Runtime.Configuration.exe /install
InishTech(R) SLP Services Runtime Configuration Utility Version 3.0.1912.27 on 32-bit .NET 2.0.50727.3615
Copyright (C) 2010 Inish Technology Ventures Limited. All rights reserved.
Invoking SLPS installation step ...
There has been a problem configuring SLPS Runtime services, full details:-
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration sect
ion system.serviceModel. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 146)
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   --- End of inner exception stack trace ---
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
   at System.Diagnostics.DiagnosticsConfiguration.GetConfigSection()
   at System.Diagnostics.DiagnosticsConfiguration.Initialize()
   at System.Diagnostics.DiagnosticsConfiguration.get_SwitchSettings()
   at System.Diagnostics.Switch.InitializeConfigSettings()
   at System.Diagnostics.Switch.InitializeWithStatus()
   at System.Diagnostics.Switch.get_SwitchSetting()
   at System.Diagnostics.TraceSwitch.get_TraceVerbose()
   at System.Configuration.Install.InstallerCollection.OnInsert(Int32 index, Object value)
   at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
   at System.Configuration.Install.InstallerCollection.Add(Installer value)
   at Slps1Runtime1ConfigurationD.B.A()
   at Slps1Runtime1ConfigurationD.A(String A_0, String A_1, D A_2)

 

After that I managed to successfully install it by calling

Slps.Runtime.Configuration.exe /msbuildtargets installAuto;platform=x86;Version=v4.0

But still SLP Code Protector complains that the Licensing storage is not configured, e.g. when calling Microsoft.Licensing.ProtectCmd.exe I get the following output

InishTech(R) SLP Code Protector Command-line Utility Version 3.0.1912.27 on 32-bit .NET 4.0.30319.1
Copyright (C) 2010 Inish Technology Ventures Limited. All rights reserved.
InishTech SLP Code Protector installation issue:
Licensing storage is not configured. Please ensure the software has been installed correctly.

 

Can you please tell me how to install SLP Code Protector an .NET4/VS2010 based system.

 

Regards,

Wolfgang

 


User avatar
InishTech Dev
InishTech Dev
RBartelink - 10/22/2010 10:32:36 PM
   
RE:framework 4.0 support

Wolfgang wrote: Can you please tell me how to install SLP Code Protector an .NET4/VS2010 based system.

Firstly, our apologies that you've encountered this failure scenario and have obviously spent significant time attempting to circumvent these issues. We've had VS2010 support since March (there was a short term pertaining to a chance between the RC and RTM editions which is covered elsewhere on this forum) with no installer issues of this nature reported. While the 3.0.1912 release from recent days adds support for targetting assemblies that require .NET 4.0 (previous releases limited the target framework to 3.5SP1 or lower), the Slps.Runtime.Configuration.exe tool itself is unchanged since March.

Thanks for the detailed information you provided - if this was on SO, there'd be many upvotes on the question :P

Wolfgang wrote: After that I managed to successfully install it by calling
Slps.Runtime.Configuration.exe /msbuildtargets installAuto;platform=x86;Version=v4.0

I admire your ingenuity in working this out! This command hooks up the SLPS_PROTECT driven inline protection. Unfortunately the intialization of the license store is a separate operation, initiated by issuing the following command:

Slps.Runtime.Configuration.exe /install

The reason they are separate commands is that one may wish to intialize a license store on a machine that is not being used for development (see the Xcopy deploy scenarios in http://support.inishtech.com/kb7)

Wolfgang wrote: But still SLP Code Protector complains that the Licensing storage is not configured, e.g. when calling Microsoft.Licensing.ProtectCmd.exe I get the following output
InishTech(R) SLP Code Protector Command-line Utility Version 3.0.1912.27 on 32-bit .NET 4.0.30319.1
Copyright (C) 2010 Inish Technology Ventures Limited. All rights reserved.
InishTech SLP Code Protector installation issue:
Licensing storage is not configured. Please ensure the software has been installed correctly.

The above banner shows that execution is correctly being bound to 4.0. This is expected as Microsoft.Licensing.ProtectGUI (Code Protector on the start menu) and Microsoft.Licensing.ProtectCmd both have specific config files that say "we've been tested with 4.0, so use it in preference to 2.0 if you have it available". Unfortunately this is not the case for Slps.Runtime.Configuration.exe. It's not clear at this stage how this potential inconsistency didnt come to light during our internal testing and beta testing of our CLR 4.0 support - both our development team and a number of consumers will, like many developers have side by side VS2008 and VS2010, CLR2.0 and 4.0.

Wolfgang wrote: InishTech(R) SLP Services Runtime Configuration Utility Version 3.0.1912.27 on 32-bit .NET 2.0.50727.3615
Copyright (C) 2010 Inish Technology Ventures Limited. All rights reserved.
Invoking SLPS installation step ...
There has been a problem configuring SLPS Runtime services, full details:-
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration sect
ion system.serviceModel. 

This suggests that the tool has loaded under .NET 2.0, but for some reason the patching is such that the framework can't process it's own config files despite the fact that the .3615 suggests you do have 3.5 SP1 (which is a prereq for the Code Protector SDK which is checked by the installer). We'll attempt a repro with the aim of resolving this for the next Code Protector release.

In the meantime, the following workarounds approaches would allow one to circumvent the issue:

1) remove .NET 2.0+3.5 - obviously an agressive thing to do - lots of system components and third party apps may depend on it

2) force Slps.Runtime.Configuration to load under .NET 4.0 where available by putting in an app.config file for it with a SupportedRuntime 4.0 element first (e.g., you could take a copy of Microsoft.Licensing.ProtectCmd.exe.config and name it Slps.Runtime.Configuration.exe.config). Obviously this is hard to achieve as the tool is running the control of the MSI installer.

While, you may be able to cause a SDK install to complete successfully armed with the above information - it's not a route I'd be holding up as ideal.

 

As a result, I suspect the best route for you given you have a box that you can successfully install on (and the demonstrated desire to remedy the situation via commandline trickery :D) is to do a manual 'install':

1) install on one box

2) copy all the files over to the other box

3) run Slps.Runtime.Configuration.exe /msbuildtargets installAuto;platform=x86;Version=v4.0

4) run Slps.Runtime.Configuration.exe /install

5) create a start menu shortcut to Microsoft.Licensing.ProtectGUI.exe entitled SLP Code Protector

NB while the above represents a sequence very similar to those carried out by the installer itself, please do not consider the above to be the official documentation - this is very much subject to change and oru aim is for the installer to Just Work as it should in all cases.

Note that this is the only instance of this issue, or anything of this nature that's been reported. We dont expect this to be a widespread condition -- there are many other customers with this mix.

We'll aim to resolve this more completely ASAP by:

a) attempting to repro the issue in order to understand exactly what combination of .NET CLRs and Visual Studio editions trigger the behavior you've triggered

b) issuing a patch edition of Code Protector in due course with a .exe.config that prevents this from happening by nominating supportedRuntimes of 4.0 and 2.0 in that order in the very near future

We'll post here when an update is available (unfortunately next Monday is a Bank Holiday in Ireland which may delay matters briefly).

Our apologies once again for the inconvenience; Please let us know if you manage to successfully apply the above workaround(s).

Regards,

Ruben.


User avatar
Member
Member
Wolfgang - 10/23/2010 3:35:06 PM
   
RE:framework 4.0 support

Hi Ruben,

thanks for your quick response.

The missing part was that I still had to call Slps.Runtime.Configuration.exe /install
and to to provide an Splps.Runtime.Configuration.exe.config file which forces the application to load under .NET 4.0

Everything works fine for me now!

Regards,

Wolfgang


User avatar
InishTech Dev
InishTech Dev
RBartelink - 10/24/2010 10:46:19 PM
   
RE:framework 4.0 support

 Hi Wolfgang,

Thanks for getting back and glad you got sorted. We'll aim to get the .exe.config into the next release ASAP in the [unlikely] event that anyone else will run into the same circumstance.

Regards,

-Ruben


User avatar
InishTech Dev
InishTech Dev
RBartelink - 2/15/2011 6:42:18 AM
   
RE:framework 4.0 support

 For the avoidance of doubt, this issue has been resolved - definitely versions 3.1.1915 and ater (not sure, but think 1913 too) have .exe.configs that ensure that CLR 4.0 is preferred if its present for Slps.Runtime.Configuration, Code Protector, ProtectCmd and LicAdmin (i.e., all exes in our SDK) in order to guarantee the most predictable behavior possible.

Apologies to anyone else that encountered problems due to this inconsistency.

If anything similar recurrs, it should nto be for any of the reasons discusssed above.

--Ruben


1

There are currently no users on-line.

  • Sticky
  • Locked sticky
  • Hot sticky
  • Hot locked sticky
  • Thread
  • Hot thread
  • Locked thread