views:

281

answers:

2

I am using .net Reactor to obfuscate a data layer assembly containing LinqToSql classes. On invoking the assembly, i am getting the following error..

Bad Storage property: '_ApplicationId' on member 'RCSQLData.Application_DB.ApplicationId'

I am using the 'Library' mode and have enabled 'Necrobit' and 'obfuscation'.

Is it possible to obfuscate LinqToSQL classes or is it the old reflection walnut again?

Michael

+1  A: 

Are you invoking the protected assembly in the code that wishes to use it? (ie. referencing the protected .dll?)

I am also using .NET Reactor, but in 'application mode' and protecting an .exe with additional assemblies and it is working fine. However I select my main assembly and specify additional satellite .dll's to be used and it is merged and protected in one shot.

I don't believe you will be able to add a reference to a protected .dll, that's the idea behind it, as it would need to reflect on it. I'll read more upon library mode and get back to you.

GONeale
A: 

Its becuase LINQ-toSQL uses Reflection very heavily. It cannot find the original properties becuase it tries to search for them by their original names (which are now obfuscated).

The solution is to exlcude the proper classes/members from renaming. Some such as Crypto Obfuscator will do all this automatically for you by detecting LINQ-SQL usage in your code.

logicnp