Hello @Mrunali Patil !
Looking at this SQL Server Reporting Services (SSRS) issue, the problem is that your Content Security Policy (CSP) header is blocking the SSRS report viewer from loading properly.
The CSP header you added:
Content-Security-Policy: default-src 'self'; style-src 'self'; script-src 'self' ;frame-ancestors 'self'
This is too restrictive for SSRS reports, which need to load external resources and scripts from the SQL Server instance.
Here's how to fix it:
Option 1: Modify your CSP header to allow SSRS resources
Add the necessary sources for your SSRS server:
Content-Security-Policy: default-src 'self' https://your-ssrs-server.com; style-src 'self' 'unsafe-inline' https://your-ssrs-server.com; script-src 'self' 'unsafe-eval' https://your-ssrs-server.com; frame-ancestors 'self' https://your-ssrs-server.com
Option 2: Use a more permissive CSP for the report pages
Create a separate CSP for pages that contain SSRS reports:
Content-Security-Policy: default-src 'self' https://your-ssrs-server.com; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; frame-ancestors 'self'
Option 3: Temporarily disable CSP for testing
If you're just testing, you can temporarily comment out the CSP header to confirm it's the cause:
<!-- Content-Security-Policy: default-src 'self'; style-src 'self'; script-src 'self' ;frame-ancestors 'self' -->
The key issues are:
- SSRS needs to load scripts and styles from the SQL Server instance
- The
'unsafe-eval'
directive is often required for SSRS report viewer - Frame-ancestors needs to include your SSRS server URL
Replace https://your-ssrs-server.com
with your actual SSRS server URL. If you're using a local instance, it might be something like http://localhost:8080
or your server's internal URL.
Hope this helps resolve your SSRS loading issue!