Error when loading PX page on browser

Or at least one of them, referred to as "blocked cross-origin frame"

Before we start

it is worth mentioning that this article is not trying to solve ANY issue you might be experiencing when viewing your PX graphic on a browser, but it is trying to address a very specific subtle thing, a small setting that caused a few clients some headaches. We hope this article will save the time to customers that might be affected. You may have seen an error such as "Webservices Content error", which could be remedied by the content of this article.


Does it look familiar?

Typically, you will be able to login to your station from your browser, you will see the top bar and the navigation tree, but your PX page will be replaced by errors similar to this:


This error is commonly seen when you have an "HTML5 Hx Profile" on your user settings (the default one), as this provides a web page to your browser with a top bar and a left hand side navigation tree, and your PX graphic will be embedded in a frame within that page.

This error will not show when you use "Handheld Hx Profile", as this will display the PX page in full without any top or side bars (the PX is not an embedded frame).


For security reason, the embedded frame is blocked as it is seen coming from a different origin than your main page, a "cross-origin frame".


Let's try fixing it

A simple way to try fixing this particular issue, is checking your station services and open the Property Sheet view of the "WebService".

Expand then the "Http Header Providers" and then the "X-Frame-Options".

If your "X-Frame-Options" is set as "Deny", change it to "Sameorigin".


See the steps below:


Zoomed in:


Try logging back in and load the page and see if this solved the issue.


Small note 1: when trying to view the web pages from your local station, try using "" instead of "https://localhost", as it is preferable.


Small note 2: this setting is usually fixed by Niagara as "Sameorigin". When you create a new station, you will see the setting as "Deny" if you open the station on your user folder, but once copied into your host Daemon and with the station running, the setting is pushed to "Sameorigin" (yes, I did try a few times with different versions). It seems like with some exact steps, this does not happen and the setting needs to be manually put to Sameorigin.


If the above did not solve your issue with displaying the PX graphic, then you are not affected by this particular configuration problem and you should look elsewhere for a cause (user access from "categories" and "roles", firewall blocking the HTTPS/HTTP ports, etc)