Html report viewer using incorrect URL

Posted by: bill on 6 May 2020, 3:48 am EST

  • Posted 6 May 2020, 3:48 am EST

    When accessing my web application with a fully qualified URL (https://myapp.mydomain.com/page.aspx) the html report viewer is trying to create XHR requests to https://myapp and not https://myapp.mydomain.com which triggers the browser to shut down the request due to CORS policy. If I start chrome with --disable-web-security switch the browser allows the request and it works. This seems like a bug in the way the URL is generated. Is this a known issue and is there a work-around? We are using AR12.

    Thanks

  • Posted 6 May 2020, 4:41 pm EST

    Hello,

    This is not a known issue and also we haven’t faced such issues. Could please try with the last version of the AR12:

    http://cdn.grapecity.com/ActiveReports/ar12/hotfixes/ActiveReports-v12.3.18652.0.msi

    Also, you can try after handling the Cors policy in the Web.Config like below:

    
    <httpProtocol>
          <customHeaders>
            <remove name="Access-Control-Allow-Origin" />
            <add name="Access-Control-Allow-Origin" value=" https://myapp" />
            <remove name="Access-Control-Allow-Headers" />
            <add name="Access-Control-Allow-Headers" value="expires, cache-control, Pragma, AuthToken, Authorization, Origin, Content-Type, Accept, X-Requested-With" />
            <remove name="Access-Control-Allow-Methods" />
            <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
            <remove name="Access-Control-Allow-Credentials" />
            <add name="Access-Control-Allow-Credentials" value="true" />
          </customHeaders>
        </httpProtocol>
    
    

    Also, please note that AR12 is out of development mode and hence, we don’t support it.Hence, I suggest to upgrade to latest version i.e AR14:

    https://www.grapecity.com/activereports

    Thanks,

    Mohit

Need extra support?

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

Learn More

Forum Channels