Why Azure Web Role by default runs in the Full Trust?

When I create an Azure ASP.NET application, by default .NET trust level is Full trust. I always change it to Windows Azure partial trust which is similar to ASP.NET’s medium trust level.

You can do it either by using GUI when you select Properties on the Role


or by setting enableNativeCodeExecution to false in the definition file (.csdef).


As a security conscious developer I want by default to run my application in partial trust mode that provides a higher level of security. If I need to use something like Reflection or P/Invoke, as a developer I want to make the decision to lower that trust level by myself.

I’m sure there’s a reason why Microsoft decided to use Full trust as a default .NET trust level, I just fail to see it. If you know the reason, or you think you know it, please let me know.

Because my blog is not the most popular site on internet yet, I also asked the same question on stackoverflow.  If you want to answer it, I don’t care if you choose to reply here or on stackoverflow.

kick it on


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s