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:
- In order to take advantage of the Silverlight viewer and WCF service, your application should target .NET 3.5 or above
framework.
-
Required assembly references:
- System.ServiceModel.dll assembly
- Telerik.Reporting.Service.dll assembly
- Assemblies with Telerik Reports to be exposed through the Reporting Service
- Add .svc file (e.g. ReportService.svc)
to reference the
Telerik.Reporting.Service..::.ReportService.
The file would contain the following line only:
CopyXML
<%@ServiceHost Service="Telerik.Reporting.Service.ReportService, Telerik.Reporting.Service, Version=x.x.x.x, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE" %>
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.
|
- Register the Reporting Service endpoints in the web.config:
CopyXML
<configuration>
...
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service
name="Telerik.Reporting.Service.ReportService"
behaviorConfiguration="ReportServiceBehavior">
<endpoint
address=""
binding="basicHttpBinding"
contract="Telerik.Reporting.Service.IReportService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="resources"
binding="webHttpBinding"
behaviorConfiguration="WebBehavior"
contract="Telerik.Reporting.Service.IResourceService"/>
<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 | |
For troubleshooting and configuring IIS hosted WCF services, please refer to IIS Hosted Service Fails article in MSDN.
|
Related Articles: