In VS 2005 you have "dotfuscator" to help make the code very difficult to
read, but that is a hokey solution at best and the code can still be read
and used and execution traced. Also dotfuscator does have some issues that
you need to read up on to avoid some of the problems associated with it --
you may have to change some code to make it play with dotfuscator. And if
that weren't enough, if you want the "true" version of dotfuscator you'll
have to pay for it.
On web apps the best way to protect your code is to "pre-compile" the app
and hide the directory containing the real code, leaving just the
pre-compiled stubs. For your assemblies you can use a Signed assembly and
provide a key.
I was able to set the file attribute to hidden on my DLL and still have my
app work correctly -- a minor layer of security.
Rob