Version

Deploying an Application to a Partial-Trust Environment

Starting in the 2006 Volume 3 release, the Ultimate UI for ASP.NET product provides a set of assemblies marked with Microsoft® .NET Framework’s AllowPartiallyTrustedcallersAttribute (APTCA) attribute. These specially-marked assemblies are capable of running in a partially trusted environment.

The procedure for deploying APTCA assemblies is the same as the procedure for deploying non-APTCA (release) assemblies. At deployment time, you need to copy (or FTP) the APTCA assemblies to the Bin folder of your Web application on your Web server in the same way as you would deploy the assemblies of your Web application.

You can make the deployment independent of the build number of the assemblies by specifying a <bindingRedirect> in your Web application’s web.config file. This technique helps to avoid having to update any @Register directives in the ASPX pages if the @Register directives differ from the version/build number of the assemblies being deployed.

To deploy your Web application to a partial-trust environment:

For each Infragistics assembly referenced by your Web application, place the following two elements in the <runtime>, <assemblyBindings> and <dependentAssembly> sections of your web.config file.

  • <assemblyIdentity> — Specify this element for each <dependentAssembly> element, and it contains the assembly file name (without the ".dll" file extension) and public key token ("7dd5c3163f2cd0cb" for all Infragistics assemblies).

  • <bindingRedirect> — This element contains one or more old version/build numbers that need to be mapped to a new version/build number. You may need to add thse elements if they were not already present in your web.config file by default.

The following example illustrates how to use a binding redirect on the Infragistics.WebUI.Shared and Infragistics.Excel assemblies.

</system.web>
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.vl">
        <dependentAssembly>
            <assemblyIdentity name="Infragistics.WebUI.Shared.v8.1" publicKeyToken="7dd5c3163f2cd0cb"/>
            <bindingRedirect oldVersion="8.1.20081.1-8.1.20081.1050" newVersion="8.1.20081.1050"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="Infragistics.Excel.v8.1" publicKeyToken="7dd5c3163f2cd0cb" />
            <bindingRedirect oldVersion="8.1.20081.1-8.1.20081.1050" newVersion="8.1.20081.1050" />
        </dependentAssembly>
        ...
    </assemblyBinding>
</runtime>
</configuration>

These <bindingRedirect> declarations inform the .NET Framework runtime to load the assemblies located in your Bin folder (which can have any build number within the range specified by the oldVersion attribute) and treat them as if they had the build number specified by the newVersion attribute. Using <bindingReditrect> in this way helps to ensure a seamless deployment, even if the build number of the assemblies on your Web site differs from those used on your development machine.