reporting-servicessubscriptionextensibility

SSRS Delivery Extension not found


I'm trying to develop a delivery extension for SSRS. I created a dll with one class. The class implements both IExtension and IDeliveryExtension interfaces. I copied the built dll file (MyExtension.dll) to the report's server bin folder. It is not in default location, but it should not be a problem:

D:\SSRS\MSRS13.MyInstanceName\Reporting Services\ReportServer\bin

In rsreportserver.config I added this in Extensions/Delivery:

<Extensions>
        <Delivery>
            <Extension Name="My Extension" Type="My.Extensions.MyExtension,MyExtension" Visible="true" />

In rssrvpolicy.config I have something like this:

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust">
    <IMembershipCondition class="UrlMembershipCondition" version="1" Url="$CodeGen$/*" />
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyCustomCodeGroup" Description="trying out delivery extension">
    <IMembershipCondition class="UrlMembershipCondition" version="1" Url="D:\SSRS\MSRS13.MyInstanceName\Reporting Services\ReportServer\bin\MyExtension.dll" />
</CodeGroup>

I do not see the extension when I create a new subscription. In log I keep getting this error:

extensionfactory!ReportServer_0-1!155c!02/18/2019-17:34:56:: e ERROR: Exception caught instantiating My Extension report server extension: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: Konfigurationsfehler beim Berichtsserver: . ---> System.IO.FileNotFoundException: Could not load file or assembly 'MyExtension.dll' or one of its dependencies. The system cannot find the file specified.. library!ReportServer_0-1!1c78!02/18/2019-17:34:56:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.NotEnabledException: , Microsoft.ReportingServices.Diagnostics.Utilities.NotEnabledException: Die angeforderte Funktionalität ist zurzeit nicht aktiviert.;

I added the MyExtension.dll to GAC and restarted report server. I granted full permissions for the dll file to the SSRS windows service account and verified the account can see it. Still no success...

What am I missing?


Solution

  • I finally found the problem, it was .NET framework version. My assembly was compiled for .NET Framework 4.6.1. When I switched to .NET Framework 3.5, all worked fine.

    Here are details: https://support.microsoft.com/en-us/help/2869522/the-net-framework-4-x-assemblies-are-not-supported-in-sql-server-repor

    Microsoft SQL Server Reporting Services (SSRS) supports extensions by including custom extensions and custom code. However, SSRS does not support Microsoft .NET Framework 4.x-based assemblies. Therefore, you cannot load a .NET Framework 4.x assembly.

    There is another problem, because I cannot reference assemblies built with .NET Framework 4.x ...

    Anyway, I hope this can help someone...