This is a migrated thread and some comments may be shown as answers.

ReportService.svc fails

2 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 21 Jul 2013, 03:13 AM
I am using the custom report service so I can pass in the file name of the trdx - this works perfectly in development and deployed to localhost. However when I deploy to the hosted server (Arvixe) the service is not available.

I have tested this by trying to access ReportService.svc directlyfrom the browser with Fiddler active and I get no response. Accessing the local hosted version works as per expected.

The site hosts a normal WCF service so it is configured to support services. The url is http://www.reefrescue.critsoft.net/ReportService.svc

This is the webconfig
<configuration>
    <system.web>
        <compilation debug="false"
                                 targetFramework="4.0" />
        <authentication mode="Windows"/>       
    <customErrors mode="On" defaultRedirect="GenericErrorPage.aspx">
        <!--<error statusCode="404" redirect="Http404ErrorPage.aspx"/>-->
    </customErrors>
    </system.web>
    <connectionStrings>
        <add name="COTSDev" connectionString="Data Source=csd2011;Initial Catalog=COTS;Persist Security Info=True;User ID=CSDApp1;Password=" providerName="System.Data.SqlClient"/>
        <add name="COTSProd" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=COTS;Persist Security Info=True;User ID=CSDApp1;Password=" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
        <services>
            <service name="Cots.Web.CustomReportService"
                             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>

Header of ReportService.svc
<%@ServiceHost Service="Cots.Web.CustomReportService, Cots.Web" %>

CustomeReportService.cs
namespace Cots.Web
{
    using Telerik.Reporting.Service;
    using Telerik.Reporting;
    using System.IO;
 
    public class CustomReportService : ReportService
    {
        //
        static readonly IReportResolver resolvers = new CustomReportResolverWithFallBack(
                                                                                                        new ReportTypeResolver(
                                                                                                                new ReportFileResolver(
                                                                                                                 new ReportFileResolverWeb(null))));
        public CustomReportService()
        {
            this.ReportResolver = resolvers;
        }
    }
 
    class CustomReportResolverWithFallBack : IReportResolver
    {
        readonly IReportResolver parentResolver;
 
        public CustomReportResolverWithFallBack(IReportResolver parentResolver)
        {
            this.parentResolver = parentResolver;
        }
 
        public ReportSource Resolve(string report)
        {
            FileInfo oFI = new FileInfo(report);
 
            ReportSource reportDocument = this.CustomReportResolver(report);
 
            if (null == reportDocument
                 && null != this.parentResolver)
            {
                reportDocument = this.parentResolver.Resolve(report);
            }
 
            return reportDocument;
        }
 
        public ReportSource CustomReportResolver(string report)
        {
            //TODO implement custom report resolving mechanism
            return null;
        }
    }
}

Short of uploading the entire project I don't know what else to do!



2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 24 Jul 2013, 12:26 PM
Hello Mark,

It seems to work from our side. Check out the screenshot.

Let us know if you still experience any difficulties.

Regards,
Peter
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Mark
Top achievements
Rank 1
answered on 25 Jul 2013, 12:11 AM
You editor seems to be broke so everything as code!
  
As I thought it was a configuration error, the multipleSiteBindingsEnabled was missing.
  
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Peter
Telerik team
Mark
Top achievements
Rank 1
Share this question
or