assemblyReferences Element Overview
Defines a collection of assembly references used by the Reporting Engine during the processing stage to resolve names of user functions, user aggregate functions, and types used by the ObjectDataSource component and Report Event Handlers.
The types from the assemblies included in the assemblyReferences element do not need to be registered explicitly in the typeReferences Element as all types in the assembly will be permitted to be used by the Reporting Engine.
XML-based configuration file:
JSON-based configuration file:
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes | None |
Child Elements |
|
Parent Elements |
|
When providing the Public Key Token, the Reporting Engine will try to match it with the Public Key Token of the found DLL. It will not load an assembly with the same name and a different Public Key Token and will throw an exception instead. If the Public Key Token is omitted in the configuration, the Reporting Engine will load the first DLL, whose name matches the provided Assembly Name. Potentially, this may allow bad agents to replace trusted assemblies with malicious ones and constitutes a security vulnerability. Since the Public Key Token provides an extra security layer to your application, we advise to always include it in the configuration file.
In the assemblyReferences
element name
attribute, you may specify the full path to the DLL file, and the Reporting Engine will load it if it finds it there. In this case, the rest of the attributes (version
, culture
, and publicKeyToken
) will be ignored by the target framework (.NET or .NET Frameworks) functionality we use in our code. This may be a security concern, as explained above, so you need to ensure the assembly on the path is a trusted one.
Example
The following code example demonstrates how to configure the reporting engine to use MyUserFunctionsAssembly assembly as a source for user functions. In this example, it would also search for assemblies in MyDir and SubDir application base sub-directories as we have explicitly instructed via the <probing>
Element. This is not mandatory, and when not specified, it will search in the application base, which is the root location where the application is being executed.
The probing element is not supported in the .NET Standalone Designer
XML-based configuration file:
JSON-based configuration file:
When adding the
Telerik.Reporting
section manually, do not forget to register it inconfigSections
element of the configuration file. Failing to do so will result in a ConfigurationErrorsException with the following text: Configuration system failed to initialize.