views:

1797

answers:

6

Hi Guys, Is there a way (reliable and preferably not commercial) to prevent from Reflector to reflect my source code???

Thanks, Adi

+5  A: 

No. Reflector looks at your assembly just like the .NET runtime would in order to generate native code to execute. The best you could hope for would be to obfuscate your code and make it (somewhat) harder for the reader to understand.

Some pros and cons of performing the obfuscation can be found at Should you obfuscate a commercial .Net application?

Blair Conrad
+1  A: 

try dotfuscator. 2005/2008 comes with a community edition. Failing that re-architecture your code (painful) i.e. ATL/COM objects(private) called by the .NET components (public).

Choice is yours.

Nobody has disassembled c++ code.
Will
@Will: Was that in question?
JoshJordan
+3  A: 

There is no way to prevent decompiling of .net code, with that said a good obfuscator will make reflected code harder to read, some of them like dotfuscator will prevent reflector from showing the C# code; however, you will always be able to see the IL.

One of the options in Dotfuscator is to use non-printable names (Reflect on reflector) This makes decompiling extremly difficult IMHO.

Microsoft used to sell a Software Proctection and Licensing Service which would encrypt the IL and use a custom VM that was tied to an encryption key which preventing reflecting using the conventional tools. This had a huge performance cost however it was good if you wanted to protect critical algorithims or for example your licensing code.

http://msdn.microsoft.com/en-us/slps/default.aspx

JoshBerke
A: 

If you are looking for a good Obfuscator, give RemoteSoft a try.

Louis Haußknecht
A: 

Not so long ago there was Anti reflector trick which was effective because .NET reflector couldn’t translate one particular IL instruction into c# code , but they've released patch and fun is over.

Jacob
A: 

Xheo Codeveil is a great product as well. They also have a Licensing solution (for creating serial numbers etc. and then have them activated thorugh your own activation server0

Colin