ActiveReports 18 .NET Edition
Samples / Web Samples / JSViewer Samples / JSViewer CORS
In This Topic
    JSViewer CORS
    In This Topic

    The JSViewer_CORS sample demonstrates using the ActiveReports JSViewer when the server is hosted elsewhere. The sample consists of two applications - client and server, to demonstrate using the CORS (Cross-origin resource sharing) where

    ActiveReports JSViewer 

    Note: To run each application in this sample, you must have:

    Sample Location

    https://github.com/activereports/WebSamples18/tree/main/JSViewer_CORS

    Details

    First, you need to build both applications and then run the Server application followed by the Client application.

    Note: The client url is specified in the web.config as the value of the custom header "Access-Control-Allow-Origin".

    When you run the applications, you will see that the client application displays the JSViewer on the browser with a list of reports. Clicking the report link in the left panel opens the report for preview. You can preview the following reports.

    The Server application consists of the following elements.