ViewerType = HtmlViewer Error

Posted by: david.kucharski on 18 May 2018, 6:49 am EST

    • Post Options:
    • Link

    Posted 18 May 2018, 6:49 am EST

    I have a WebViewer on my page and the default ViewerType is AcrobatReader. The page shows the contents fine. I have an option on the screen that allows the user to switch to HTML Viewer if needed. Once selected, the system postbacks the page, changes the ViewerType and then I receive the below error.

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If reportType.Value = "" Then
                WebViewer1.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.AcrobatReader
                aReportType.InnerText = "HTML Viewer"
            Else
                WebViewer1.ViewerType = GrapeCity.ActiveReports.Web.ViewerType.HtmlViewer
                aReportType.InnerText = "Acrobat Reader"
            End If
            mobjDatabase.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("iAnalyzeConnectionString")
            mobjDatabase.subOpenConnection()
            setJobDetailInformation()
            subSetDistributionPattern()
            loadDetails()
            subCloseConnections()
        End Sub
    

    error: Failed to send request to /IO_Direct_2010/ActiveReports.ReportService.asmx/GetReportProperty - Forbidden.

  • Posted 20 May 2018, 8:35 pm EST

    Hello,

    I am not able to replicate the issue. Please refer the attached sample.

    Could you please share the sample application so that I can reproduce the issue at my end. Also, please tell the exact AR version that you are using.

    Thanks,

    Mohit

    prj_Test.zip

  • Posted 20 May 2018, 11:52 pm EST

    Mohit,

    Thank you for you response. Attached is the zip file of your web application 10. All I did was change the references from your version to my version. 11.1.9726.0

    When I run it on my machine and on a server that is not HTTPS, the program runs successfully. When I run it on my test machine that is HTTPS, I receive the errors.

    WebApplication10.zip

  • Posted 21 May 2018, 1:16 am EST

    Hello David,

    I have checked the application in following way:

    1: Run the application through the Visual studio with “HTTPS” configuration and found that no error occurs

    2: Deploy the application on IIS with “HTTPS” binding and found that no error occurs

    Could you please confirm If I am missing anything.

    Thanks,

  • Posted 21 May 2018, 2:53 am EST

    Mohit below is what my network guy saw with the HTTPS issue.

    Here is what I see happening with the new Active Reports version. Our HTTPS traffic terminates on an F5 Load Balancer and the backend communication is through HTTP. When the ActiveReports.ar11 is returned the URL for the WebViewer it is generating an HTTP link back to the browser since the web server is listening on HTTP. Switching the HTTP in the link to HTTPS manually brings the report right up.

    http://test.nsamedia.com/WebApplication10/ActiveReports.ar11?Token=e4f8c1d6-0990-471b-a5a4-184b4d708a40&Generation=1&Page=1&WebViewerControlClientId=WebViewer1&HtmlViewer=true

    Is there a configuration option in Activereports to always return HTTPS links to the browser? Worst case we may be able to rewrite the URL using an F5 irule but I would consider that a workaround and probably not supported by ActiveReports.

  • Posted 21 May 2018, 6:22 pm EST

    Hello,

    Please try after adding “AccessPoint” and “PublicURI” attribute in “Web.Config” file. Please refer the following line:

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

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels