New to Telerik Reporting? Download free 30-day trial

How to Add Telerik Reporting WCF Service to Web Application

The Silverlight Report Viewer and its WCF Reporting Service are no longer supported and deployed with the installation of Telerik Reporting. The last release of Telerik Reporting with included Silverlight Report Viewer is R1 2023.

This topic describes how to host the Telerik Reporting WCF Service in IIS. For this purpose you should follow the steps below to configure your web application:

  1. Required assembly references:

    • System.ServiceModel.dll assembly
    • Telerik.Reporting.Service.dll assembly
    • Assemblies with Telerik Reports to be exposed through the Reporting Service
  2. Add .svc file (e.g. ReportService.svc) to reference the Telerik.Reporting.Service.ReportService. The file would contain the following line only:

    <%@ServiceHost Service="Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, Version=x.x.x.x, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" %>
    

    The code sample has the version listed as Version=x.x.x.x, and you should change that with the exact assembly version you use before proceeding.

  3. Register the Reporting Service endpoints in the web.config:

    <configuration>
    ...
        <system.serviceModel>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
            <services>
                <service
                        name="Telerik.Reporting.Service.ReportService"
                        behaviorConfiguration="ReportServiceBehavior">
                    <!-- endpoint allowing clients access to the Reporting WCF service -->
                    <endpoint
                        address=""
                        binding="basicHttpBinding"
                        contract="Telerik.Reporting.Service.IReportService">
                    </endpoint>
                    <!-- endpoint allowing clients access to resources as images -->
                    <endpoint
                            address="resources"
                            binding="webHttpBinding"
                            behaviorConfiguration="WebBehavior"
                            contract="Telerik.Reporting.Service.IResourceService"/>
                    <!-- endpoint allowing clients access to receive service's metadata via SOAP messages -->
                    <endpoint
                            address="mex"
                            binding="mexHttpBinding"
                            contract="IMetadataExchange" />
                </service>
            </services>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="ReportServiceBehavior">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="false" />
                    </behavior>
                </serviceBehaviors>
                <endpointBehaviors>
                    <behavior name="WebBehavior">
                        <webHttp />
                    </behavior>
                </endpointBehaviors>
            </behaviors>
        </system.serviceModel>
     ...
    </configuration>
    

For troubleshooting and configuring IIS-hosted WCF services, please refer to IIS Hosted Service Fails article in MSDN.

See Also

In this article