问题是什么,对服务的调用工作正常,但是当它在线时显示Given URL is not allowed by the Application configuration
应用程序的设置不允许使用一个或多个给定的URL。
它必须与网站URL或Canvas URL匹配,或者域必须是控制台日志中某个App域的子域?
代码:
function CallService(serviceurl) {
alert(serviceurl);
$.ajax({
Type: "GET",
contentType: "html",
url: serviceurl,
success: function (arg) {
console.log(arg);
if (arg != "") {
if (arg == "nodata") {
console.log(arg);
chkData = false;
$('#loading').empty(); return; }
$("#dynamiccontainer").append(arg);
chckGamesDisplayed = false; } $('#loading').empty();
}
}
);}
答案 0 :(得分:2)
使用下面的代码,现在正常工作
var serviceurl = "Pages/abc.aspx?Id=" + id;