Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding http headers to SSRS

Is there a way to add in custom http response headers to the response from SSRS?

Something similar to adding the following to an IIS web.config file? I tried adding it in C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\web.config but it doesn't work.

<system.webServer>
        <httpProtocol>
            <customHeaders>
            <add name="X-Frame-Options" value="SAMEORIGIN" />
         </customHeaders>
     </httpProtocol>
</system.webServer>

This is on Windows 2012 r2 running SQL Server 2012.

FYI, I'm not talking about the column headers in a report itself.

Thanks, Shawn

like image 992
Shoo Avatar asked Nov 07 '22 22:11

Shoo


1 Answers

It is now possible to set HTTP headers in Power BI Report Server and SQL Server Reporting Services 2017 and later.

You have to connect to the Report Server instance in SQL Server Management Studio, right click on the Report Server name, then select Properties, and finally select the Advanced menu option. The Microsoft Documentation covers it extensively (Link below).

Server Properties Advanced Page - Power BI Report Server & Reporting Services

The issue I faced was connecting the the Report Server instance in SSMS. The Report Server instance was on a different server to the database instance and SSMS installation. The trick was to specify the 'Web Service URL' of the Report Server instance. e.g. http://example.local/reportserver. There's more information in the Microsoft Documentation if you have issues (Link below)

Connect to a Report Server in Management Studio

like image 93
Jason Avatar answered Dec 04 '22 20:12

Jason