Click to Rate and Give Feedback
MSDN
MSDN Library
Online Services
Windows Azure SDK
 Hosting Web and Worker Roles Under ...
Hosting Web and Worker Roles Under Full Trust

By default, a web role or worker role runs on Windows Azure under full trust. Under full trust, your role has a greater degree of flexibility in terms of accessing system resources and both managed and native libraries than it does under Windows Azure partial trust.

Windows Azure full trust offers developers a number of options that are not available when running under partial trust. Some of these options include:

  • A managed role can call .NET libraries that are available only under full trust. To be available to callers running under partial trust, a .NET assembly must set the AllowPartiallyTrustedCallers attribute. Assemblies that do not include the AllowPartiallyTrustedCallers attribute can be called only by code running under full trust.

  • A managed role running under full trust can read the local registry of the server on which it is running. Note that it is not possible to write to the local registry.

  • A managed role running under full trust can call native code. Native code execution enables you to spawn new native processes or invoke 32-bit or 64-bit native libraries via P/Invoke. See Executing Native Code in Windows Azure and the Development Environment for more information.

noteNote
Under full trust, it is possible to read system resources such as the registry and system libraries. The Windows Azure Terms of Service agreement outlines which resources you are permitted to access.

Configuring a Role To Run Under Full Trust

  • You configure a role to run under full trust within the service definition file. The service definition schema provides an enableNativeCodeExecution attribute on the WebRole element and the WorkerRole element. This value is set to true by default; you can also choose to explicitly set it.

See Also

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker