How do I enable DEP or ASLR for my .NET application?
问题 I'm writing my program in VS2010 and the build target is .NET 4. I believe that the DEP compatibility flag is on by default. Is that true? Is .NET also compatible by default with ASLR, and is ASLR turned on by default for my process, or do I have to request it at runtime? 回答1: Yes, the NXCOMPAT flag is turned on by the standard .NET language compilers since .NET 2.0 SP1. ASLR is essentially automatic in .NET programs by virtue of the JIT compiler. Where it will place the JIT compiled machine