Unable to open file /Access Control allow origin error

I have added Access Control allow origin in head in my file which i am trying to access still i am unable to access file. I have added following line of code in my file. I am working on web forms
Response.AppendHeader(“Access-Control-Allow-Origin”, “*”);
Here is my Code:
<script src=”https://cdn.flexmonster.com/flexmonster.js”></script>

<script type=”text/javascript”>
var pivot = new Flexmonster({
container: “pivot-container”,
componentFolder: “https://cdn.flexmonster.com/”,
toolbar: true,
beforetoolbarcreated: customizeToolbar,
report: {
dataSource: {
dataSourceType: “json”,
/* URL to the Data Compressor */
filename: “http://sms.iblhc.com:1980/mob/rrfi.aspx”
}
}
});
function customizeToolbar(toolbar) {
// get all tabs
var tabs = toolbar.getTabs();
toolbar.getTabs = function () {
// delete the first tab
delete tabs[0];
delete tabs[1];
return tabs;
}
}
</script>
I have attached screenshot 

Attachments:
Capture2.PNG

1 answer

Public
Iryna Kulchytska Flexmonster June 29, 2018

Hi Rizwan,
 
Thank you for posting your question on the forum.
 

It is correct that CORS should be enabled. 

Have you followed the “Read more info about this error” link in the error message pop-up? It would forward you to the link https://www.flexmonster.com/doc/typical-errors/#!unable-to-open-file
where you can find the list of possible reasons for this message.
 
Could you please check them one by one?
 
Kind regards,
Iryna

Please login or Register to Submit Answer