cross domain not working have error in console like this No 'Access-Control-Allow-Origin' header is present on the requested resource
im using html page in asp.net with json
my json code is
function beginCompile() {
setControlsEnabled(false);
clearOutputWindow();
var sourceCode = window.cseditor.getValue() || document.getElementById("sourcecode").value;
//alert(sourceCode);
setStatus("Compiling...");
$.ajax({
type: "POST",
url: "http://jsil.org/try/compile.aspx",
contentType: "text/plain; charset=UTF-8",
cache: false,
dataType: "json",
data: sourceCode,
success: compileComplete,
error: function (xhr, status, moreStatus) {
compileComplete(false, status + ": " + moreStatus);
},
});
};
function compileComplete(data, status) {
setControlsEnabled(true);
if (data && data.ok) {
setJavascript(data.javascript);
setStatus(
"Compile successful.<br>" +
"C# compile took " + data.compileElapsed + " second(s).<br>" +
"Translation took " + data.translateElapsed + " second(s)."
);
highlightErrorLines(null);
runInOutputWindow(data.javascript, data.entryPoint, data.warnings);
} else {
var errorText = String(data.error || status);
highlightErrorLines(errorText);
}
};
when i execute my page this code i have error
XMLHttpRequest cannot load http://jsil.org/try/compile.aspx. No 'Access-Control-Allow-Origin' header is present on the requested resource