HTML5 Viewer and HTTPS

Originally Posted 30 August 2016, 8:00 am EST

  • Originally Posted 30 August 2016, 8:00 am EST

    We have the setup where HTTPS is proxied (the web site url is https but the connection to the web server is http). This causes the Mixed Content error:
    jquery:1 Mixed Content: The page at 'https://...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://.../ActiveReports.ar10…'. This request has been blocked; the content must be served over HTTPS.
    The report service is being called as http:// even thought the report service url is set as https:// in the View.

    Following the suggestion in the following thread almost solves the problem in that the viewer now displays the report: http://arhelp.grapecity.com/groups/topic/using-active-reports-web-viewer-behind-a-reverse-proxy/
    $.ajaxPrefilter(function (options, originalOptions, jqXHR) {
    if (options.type == "GET" && options.url.startsWith('http://'))
    options.url = options.url.replace('http://', 'https://');
    });

    However images in the report still try to load via http as does clicking the print or any of the export buttons:
    Loading mixed (insecure) display content "http://...;Command=DelayedResource;ImageId=..." on a secure page
    Blocked loading mixed active content "http://..Command=Export&ExportType=Pdf&PrintOnOpen=True&Generation=1"

    Thanks for the help
  • Reply

    Hello,

    I have escalated this issue to the development team(202480) and will get back to you as soon as I receive an update from their side.

    Regards,
    Reema
  • Reply

    Hello ,

    there is ActiveReports10 section in bottom part of web.config, with publicURI property it will look like on screenshot.

    Thanks,
    Sergey Romanov.

  • Reply

    Hello,

    Here is an update from the development team :
    "Try to set publicURI for the report service in web.config"

    Hope that helps.

    Regards,
    Reema
  • Reply

    Just tried it in the web.config but it did not making any difference.




    The messages are still the same: "Loading mixed (insecure) display content “http://..." no matter what I put in for publicURI. It is as if this setting is not being applied...
    The viewer is setup in the View like this:
    viewer = GrapeCity.ActiveReports.Viewer({
    element: '#viewer',
    reportService: {
    url: '@Url.Content("~/ReportService.asmx")'
    },
    I also tried giving it the full url here ('https://sitename.com/ReportService.asmx') but got same results.
  • Reply

    In the web.config I used the example given with : publicURI="https://sitename/"
  • Reply

    Hello ,

    mixed content can be blocked by browser. did you check how your site works when mixed content is not blocked?
    https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox

    Thanks,
    Sergey Romanov.
  • Reply

    I tried unblocking in Firefox but viewer still throws an error, firebug shows "loading mixed content" messages, but get shows as aborted: GET http://sitename.com/ActiveReports.ar10?Token=c47c3..&Generation=1&WebViewerControlClientId=html5viewer&HtmlViewer=true&Page=1&ie=1472741..
    As before, the viewer shows how many pages there are and left and right buttons seem to work but the pages are not visible and print and export buttons don't work ("get" show up as aborted in firebug).
  • Reply

    Hello ,

    please make sure that you use SP2 release of ActiveReports 10:
    http://cdn.grapecity.com/ActiveReports/ar10/ActiveReports-v10.2.8028.0.msi

    Thanks,
    Sergey Romanov.
  • Reply

    I tried the new release but unfortunately getting identical errors.
  • Marked as Answer

    Reply

    Hello ,

    please try to add accesspoint attribute in addition to publicURI:

    <webservice accessPoint="http...servicename.asmx" publicURI=”https://sitename/"></webservice>


    if it won't help, then we need a sample of project and steps to reproduce for this issue.

    Thanks,
    Sergey Romanov.
  • Reply

    In my web.config the ActiveReports10 section was in a sectionGroup. It needed to be directly under configSections for the publicUri setting to take effect. It works now. Thank you!
  • Reply

    reema-pruthi said:
    Hello,

    Here is an update from the development team :
    "Try to set publicURI for the report service in web.config"

    Hope that helps.

    Regards,
    Reema



      Query:

    As we don't have the publicURI, accessPoint settings in the Active Reports 9 version. How to handle this type of mixed active content error- SEC7111: HTTPS security is compromised by http://sitename.com/ActiveReports.ar9?Token=e1ced554-f768-4e75-81fd-3f1294c53708&Command=Export&ExportType=Pdf&WebViewer=true&Generation=1
    sitename.com in Active Reports 9 version?

    Thank you!
  • Reply

    Hello,

    Could you please try with the last build of AR9 as some change has been done in this build regarding the same.
    http://cdn.grapecity.com/ActiveReports/ar9/hotfixes/ActiveReports-v9.5.7547.0.msi

    Also,Please note that AR9 is a legacy product now. It is out of maintenance mode now. Hence, we do not provide support for the same or no bug fixing will be done in the same. I would recommend you use the latest version of ActiveReports i.e ActiveReports 14. Please refer to the following link for more information: https://www.grapecity.com/activereports.

    Thanks,
    Mohit
  • Reply

    mohitg said:
    Hello,

    Could you please try with the last build of AR9 as some change has been done in this build regarding the same.
    http://cdn.grapecity.com/ActiveReports/ar9/hotfixes/ActiveReports-v9.5.7547.0.msi

    Also,Please note that AR9 is a legacy product now. It is out of maintenance mode now. Hence, we do not provide support for the same or no bug fixing will be done in the same. I would recommend you use the latest version of ActiveReports i.e ActiveReports 14. Please refer to the following link for more information: https://www.grapecity.com/activereports.

    Thanks,
    Mohit


    Thanks Mohit for your quick response!

      Query:

    After your suggestion, I'm using the latest version of Active Reports AR14 but little confusion on what the value should accessPoint setting contains or how to resolve this mixed content error in AR14- http://sitename.com/ActiveReports.ar9?Token=e1ced554-f768-4e75-81fd-3f1294c53708&Command=Export&ExportType=Pdf&WebViewer=true&Generation=1 ?


  • Reply

    Hello Gayathri,

    In AR14, the rendering system of WebViewer is totally changed. In my understanding, it should work without any doing additional setting as we are doing in the previous version. Could you please try with the trial version of AR14 and if problem occurs, please let me know and share the screenshot of the error.

    I would be more than happy to help you.

    You can download the product samples at the following location:
    https://github.com/activereports/WebSamples14/tree/master/JsViewerSamples

    Thanks,
    Mohit
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels