When I create an Azure ASP.NET application, the default .NET trust level is Full trust by default. I always change it to a partial trust in Windows Azure, which is similar to the average trust level of ASP.NET.
This can be done either through the graphical user interface when you select Properties in Role, or set the enableNativeCodeExecution parameter to false in the definition file (.csdef), as shown below:
<WebRole name="ServiceRuntimeWebsite" enableNativeCodeExecution="false">
As a security developer, I want to run my application in partial trust mode by default, which provides a higher level of security. If I need to use something like Reflection or P / Invoke as a developer, I want to decide to lower this level of trust myself.
I am sure that there is a reason Microsoft decided to use Full trust as the standard .NET trust level, I just do not see it. If you know the reason or think you know it, let me know.
Vadim source
share