Q.
What trust level is required for Dundas Chart for ASP.NET (Visual Studio 2005)?
A.
Dundas Chart for ASP.NET provides extensive
AJAX functionality and makes temporary file management more efficient
with its HTTP handler. Each of these require certain permissions in
order for the control's code to run successfully. This means that if
you have customized the
trust
level for your application, you may need to make changes to the
security policy.
-
The HTTP handler of Dundas Chart is configured using the
web.config file, and will require the
ConfigurationPermission.
This permission is not granted by default in trust policies for
the Medium trust level or lower.
-
If AJAX features of the chart are enabled, the
SerializationFormatter flag of
SecurityPermission is needed.
This is not included for the High trust level or lower, and must
be added if you use any trust level other than Full.
Unless you have a reason not to, you can set your application's trust
level to Full to run Dundas Chart. In other cases, you can
customize your Medium or High trust level policy file to include these
permissions as described in
this
MSDN library article.
Medium Trust Additions
The following additions are necessary to the
Medium trust level.
Between <SecurityClasses> and
</SecurityClasses> tags:
<SecurityClass Name="ConfigurationPermission"
Description="System.Configuration.ConfigurationPermission,
System.Configuration, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
/>
Add the following as a child element of
<PermissionSet> element with
Name="ASP.Net", add the following:
<PermissionSet Name="ASP.Net">
…
<IPermission
class="ConfigurationPermission"
version="1"
Unrestricted="true"
/>
…
</PermissionSet>
High Trust Additions
The following addition is necessary for High trust levels or
lower if AJAX features are enabled.
In the <IPermission> element
with class="SecurityPermission", the flag
"SerializationFormatter" must be added:
<IPermission
class="SecurityPermission"
version="1"
Flags="Assertion, Execution, ControlThread, ControlPrincipal,
RemotingConfiguration, SerializationFormatter"
/>
Below you can find an example of a customized Medium trust policy
file that Dundas Chart for ASP.NET (Visual Studio 2005) can run
successfully with AJAX features enabled.
|