locked
Enable CORS on SSRS RRS feed

  • Question

  • Hello. 

    I would like to display reporting services in the confines of my web app. The idea is to access reports, but not to have to leave the application. The solution, well, kind of a solution, is to host the reporting services inside of the iframe element. All works fine until you request some xls files to be downloaded, which get blocked by CORS. 

    My question, is it possible, and how, to enable CORS for reporting services so I can host them in this fashion? My web app and SQL services are on different servers (obviously).

    The other solution would be to fetch data from the reporting services through the controller action, and parse the recieved data, and then serve data in a way that substitutes all the links with the link to that action, and some additional attributes or other manipulation where would the original link be stored.

    Thank you.

    Thursday, October 2, 2014 2:24 PM

Answers

  • Hi Hugibeer,

    According to your description, you want to show report within your web application. Right?

    In this scenario, we can use ReportViewer control to display a report in a web application. See the following link: ReportViewer Controls (Visual Studio)

    In Reporting Services, we don't have any build-in API for supporting cross-origin resource sharing. Since this is a third party product. We believe you can more effective information on its offical site:

    http://enable-cors.org/index.html

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    Friday, October 3, 2014 4:46 PM

All replies

  • Hi Hugibeer,

    According to your description, you want to show report within your web application. Right?

    In this scenario, we can use ReportViewer control to display a report in a web application. See the following link: ReportViewer Controls (Visual Studio)

    In Reporting Services, we don't have any build-in API for supporting cross-origin resource sharing. Since this is a third party product. We believe you can more effective information on its offical site:

    http://enable-cors.org/index.html

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    Friday, October 3, 2014 4:46 PM
  • CORS is Third party product, ha? Nice.
    Saturday, March 12, 2016 10:28 PM
  • Hi Hugibeer,

    According to your description, you want to show report within your web application. Right?

    In this scenario, we can use ReportViewer control to display a report in a web application. See the following link: ReportViewer Controls (Visual Studio)

    In Reporting Services, we don't have any build-in API for supporting cross-origin resource sharing. Since this is a third party product. We believe you can more effective information on its offical site:

    http://enable-cors.org/index.html

    If you have any question, please feel free to ask.

    Best Regards,
    Simon Hou

    this answer is wrong and fails to address a common use case.

    first CORS is a standard and not a product.

    second Microsoft publishes .net libraries for OWIN that support CORS configuration of aspnet web applications.

    what is lacking is a method to configure how SSRS interacts with the Microsoft OWIN plumbing to emit the standard CORS headers.

    I can not see why this is not clearly understood and supported for SSRS as there are many cases where the web domain of an application server and a SSRS server may not be the same.

    Tuesday, June 14, 2016 12:21 PM
  • Do they really dont understand what CORS is? This is scary.
    Tuesday, June 14, 2016 1:58 PM
  • +1 year later, any luck using SSRS Rest API with CORS support ?
    Wednesday, January 10, 2018 8:47 PM