Compartilhar via


DexRuntimeGetWebClientTrustLevel()

The DexRuntimeGetWebClientTrustLevel() function returns an integer indicating the trust level of the Silverlight application for the web client.

Syntax

DexRuntimeGetWebClientTrustLevel()

Parameters

• None

Return value

An integer value indicating the trust level:

Value

Description

0

The Silverlight application for the web client is running in sandboxed mode.

1

The Silverlight application for the web client is running in fully-trusted mode.

Comments

By default, the Silverlight application for the web client runs in "sandboxed" mode. This means it has restricted access to local system resources. When a user attempts to perform an action (such as downloading a file that was created by a report) the sandboxed mode may prevent them from doing so. The local system can be configured to run the Silverlight application for the web client with enhanced trust level, allowing these formerly restricted actions.

Examples

The following C# example retrieves the trust level for the application.

if (Dynamics.Forms.SyVisualStudioHelper.Functions
.DexRuntimeGetWebClientTrustLevel.Invoke() == 1)
{
    checkBoxTrust.Checked = true;
}
else
{
    checkBoxTrust.Checked = false;
}

The following Visual Basic example retrieves the trust level for the application.

If Dynamics.Forms.SyVisualStudioHelper.Functions _
.DexRuntimeGetWebClientTrustLevel.Invoke() = 1 Then

    CheckBoxTrust.Checked = True

Else

    CheckBoxTrust.Checked = False

End If