Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What advice can you give concerning the obfuscation of code that uses Reflection/Serialization/Remoting?

0
Posted

What advice can you give concerning the obfuscation of code that uses Reflection/Serialization/Remoting?

0

The problem with obfuscation of the code that uses Reflection/Serialization/Remoting is that it references assembly members by name. In the situation when an obfuscator changes names, this method of referencing members of an assembly may not work, since the name of an assembly member can be changed during obfuscation. For these situations we recommend the following: • When designing an assembly, be prepared to the possibility of obfuscation and mark the assembly members that are used in Reflection /Serialization/Remoting to exclude them from obfuscation. • Separate the code that is used in serialization from the one that isn’t. Since code that is used in Remoting/Serialization/Reflection must not be obfuscated, it can be stolen and analysed. • Instead of Type.GetType(“MyType”) expressions, use typeof(MyType). • Do not forget about the strong aspects of declarative programming, and use these attributes to declare the members of assemblies. This will help avoid the use of reflection and

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.