在reportserver中设置Access-Control-Allow-Origin

时间:2016-01-20 13:06:04

标签: sql-server reporting-services

如何在reportserver中设置Access-Control-Allow-Origin?

我使用javascript测试与报表服务器的连接,但返回以下消息:(在Access-Control-Allow-Origin标头中找不到Origin myOriginURL ):

var invocation = new XMLHttpRequest();

function handler(evtXHR) {
    if (invocation.readyState == 4) {
        if (invocation.status == 200) {
            var tresponse = invocation.responseText;
            alert(tresponse);
        }
        else
            alert("Invocation Errors Occured" + invocation.readyState);
    }
    else {
        alert("currently the application is at" + invocation.readyState);
    } }

function TestConnection(){

 var url = tReportServerURL;

            if (invocation) {  invocation.open('GET', url, true);  invocation.onreadystatechange = handler;  invocation.send();
                }

}

0 个答案:

没有答案