MSEDGE - XML files are not rendered if it tries to access local XSLT files in the same directory,

Copper Contributor

I was not able to open xml file in MSEDGE it displays blank page. This is because XML file has reference to the XSL file with the xml file. I could see the below error in the Developer Console.

 

Unsafe attempt to load URL file:///E:/path/filename.xslt from frame with URL file:///E:/path/filename.xml. 'file:' URLs are treated as unique security origins.

 

file:// protocol is not in EDGE working due to some security reasons. XML is not able to load xslt.

 

 The same is work in IE, it is failing in chrome and EDGE.

 

Accessing xslt from with in xml is restricted due to some security reasons. File:/// protocol that was working in IE and opening XSLT from XML is not working in MSEDGE.

 

--allow-file-access-from-files command line option or using MS Edge IE mode these are the work arounds. 

 

Our concern here is using MS Edge IE mode - is there are any limitations and/or security exposure if we use Edge in IE mode.

This option looks like we are allowing this option work for all files of similar types.

Will there be any security concern by enabling this option. Please let us know.

 

And also other than these work arounds what are the options to make this work and avoid the original error Unsafe attempt to load URL file:///E:/path/filename.xslt from frame with URL file:///E:/path/filename.xml. 'file:' URLs are treated as unique security origins.

We are trying to display an output log xml by applying style sheet as shown below

Seaswara_0-1661299543675.png

 

 

2 Replies

@Seaswara Hello!  It looks like you are encountering a scenario that was covered in a blog post by Eric Lawrence from the team.  The article does go into detail and contains some work arounds.  Please see: Restrictions on File Urls – text/plain (textslashplain.com)

 

IE mode in Microsoft Edge does provide backwards compatibility for legacy apps and sites within a modern browser.  A lot of great informational links can be found here: https://docs.microsoft.com/en-us/lifecycle/announcements/internet-explorer-11-end-of-support or here: https://docs.microsoft.com/en-us/deployedge/edge-ie-mode Thanks!

 

-Kelly