https problem via reporting services

4 posts, 0 answers
  1. TURKALP
    TURKALP avatar
    14 posts
    Member since:
    Jan 2014

    Posted 11 Sep 2014 Link to this post

    Hello fellas

    Me and my team uses telerik silverlight fine. Nowadays we are advancing from http to https. The entire project has moved https, works well! , except telerik reports. The project uses custom binding. Is there any reference which uses https?  please help.
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 16 Sep 2014 Link to this post

    Hello,

    The Reporting WCF service is  standard WCF service, and as such can be configured to work over HTTPS. Please check the following help article - How to: Enable SSL for Telerik Reporting WCF service. If the described configuration does not help you to resolve the problem, please double check the endpoints settings, at both client and sever. Also verify the used custom Bindings use proper security mode.

    I hope the above information helps you.

    Regards,
    Stef
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. TURKALP
    TURKALP avatar
    14 posts
    Member since:
    Jan 2014

    Posted 18 Sep 2014 in reply to Stef Link to this post

    Hello Stef..
    I carefully  followed your instructions, and took  a deep search through google , telerik reporting with https (SSL) enabled keywords, but my problem still persists similar to  http://www.telerik.com/forums/silverlight-reportviewer-throws-async-exceptionoccurred   ,with no solution.
    I think, the cause of the problem is unknown... I tried changing endpoints, web,config, but no result....

    Could you give me a demo, representing the telerik demo with https SSL enabled working?

    So, I would see the real cause of this problem.
  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 23 Sep 2014 Link to this post

    Hi,

    Please test the following settings:
    1. Configure the service as follows:
      <system.serviceModel>
          <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        
          <bindings>
            <basicHttpBinding>
              <binding name="BasicHttpBindingConfig">
                <security mode="Transport" />
              </binding>
            </basicHttpBinding>
            <webHttpBinding>
              <binding name="WebHttpBindingConfig">
                <security mode="Transport" />
              </binding>
            </webHttpBinding>
          </bindings>
        
          <services>
            <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior">
        
              <endpoint address="" binding="basicHttpBinding" bindingConfiguration="BasicHttpBindingConfig" contract="Telerik.Reporting.Service.IReportService">
                <identity>
                  <dns value="localhost" />
                </identity>
              </endpoint>
        
              <endpoint address="resources" binding="webHttpBinding" bindingConfiguration="WebHttpBindingConfig" behaviorConfiguration="WebBehavior" contract="Telerik.Reporting.Service.IResourceService" />
        
              <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
            </service>
          </services>
        
          <behaviors>
            <serviceBehaviors>
              <behavior name="ReportServiceBehavior">
                <serviceMetadata httpsGetEnabled="true" httpGetEnabled="false" />
                <serviceDebug includeExceptionDetailInFaults="false" />
              </behavior>
            </serviceBehaviors>
        
            <endpointBehaviors>
              <behavior name="WebBehavior">
                <webHttp />
              </behavior>
            </endpointBehaviors>
        
          </behaviors>
        </system.serviceModel>

      The service would run at https://localhost/CSharp.SilverlightDemo.Web/ReportService.svc

    2. In the client we specifying the security mode and the endpoint address of the service
      Stream file;
        
           void Test()
           {
               var fileDlg = new SaveFileDialog();
               fileDlg.Filter = "PDF files|*.pdf|All files|*.*";
        
               if (fileDlg.ShowDialog() == true)
               {
                   //set any deviceInfo settings if necessary
                   var deviceInfo = new NameValueDictionary();
                   //set any report parameter value if necessary
                   var parameters = new NameValueDictionary();
        
                   this.file = fileDlg.OpenFile();
                    
                     
                   BasicHttpBinding bndReport = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
                   bndReport.MaxReceivedMessageSize = int.MaxValue;
                   bndReport.MaxBufferSize = int.MaxValue;
                   string ReportServiceURL = new Uri(App.Current.Host.Source, "../ReportService.svc").ToString();
                    
                    
                   var serviceClient = new ReportServiceClient(bndReport, new EndpointAddress(ReportServiceURL));
        
                  serviceClient.RenderAsync("PDF",
                                           "Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary",
                                           null,
                                             deviceInfo,
                     parameters);
                   serviceClient.RenderCompleted += new EventHandler<RenderEventArgs>(serviceClient_RenderCompleted);
        
               }
           }
        
           void serviceClient_RenderCompleted(object sender, RenderEventArgs e)
           {
               var result = e.RenderingResult;
               if (this.file != null)
               {
                   this.file.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                   this.file.Close();
                   this.file.Dispose();
                   this.file = null;
               }
           }


      The above settings assume the application is hosted in IIS with enabled SSL, where the application runs at https://localhost/CSharp.SilverlightDemo.Web.


    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top