Search code examples
asp.netx-frame-options

X-Frame-Options for one page .aspx


I am updating a site, we need to change the x-frame-options to deny everywhere. So what I did was to change this in the IIS, that is working fine.

But we have a page that loads the reports, and it's using frames, so now I get:

'Refused to display <file> in a frame because it set 'X-Frame-Options' to 'deny'.

Which makes sense, but how can I set only one .aspx page as SAMEORIGIN? I've been trying to find another way since everyone says that meta tag would be ignored.

Any help would be appreciated


Solution

  • In case it helps someone, we ended up setting it as 'SAMEORIGIN', problem is, some reports are created using frames, and we can't change them for now, so this was the best/easiest solution for this case. Thanks!