【发布时间】:2014-06-18 20:38:16
【问题描述】:
我从 dojo 调用我的 wcf 服务并收到无法加载错误 500。当我在 Visual Studio 中使用 WCF 测试客户端测试该服务时,它工作正常。我正在使用 dojo xhr get 调用 WCF 服务:
模块调用服务:
define(['dojo/store/Memory', 'dojo/_base/xhr', "dojo/data/ObjectStore"],
function (Memory, xhr, ObjectStore) {
return {
GetReaches: function (url) { //url is: "http://localhost:54052/FormTest/proxy.ashx?http://localhost:57735/Service1.svc/GetReaches/"
xhr.get({//get data from database
url: url,
handleAs: "json",
load: function (result) {
ReachData = result.GetReachesResult;
},
error: function (err) { }//500 error caught
});
} //GetReaches
}
});
我没有向服务传递任何参数,因此传递给函数的数据类型不会是错误的。有什么其他可能是问题的想法吗?
谢谢
皮特
【问题讨论】: