Progress® Telerik® Reporting R2 2017

How To: Add Telerik Reporting WCF Service to Web Application

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.ServiceReportService. The file would contain the following line only:

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

    The code sample have 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>
Caution note Caution

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