【问题标题】:unable to load error 500 calling wcf service from dojo无法加载从 dojo 调用 wcf 服务的错​​误 500
【发布时间】: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
    }

});

我没有向服务传递任何参数,因此传递给函数的数据类型不会是错误的。有什么其他可能是问题的想法吗?

谢谢

皮特

【问题讨论】:

    标签: wcf dojo


    【解决方案1】:

    终于让它工作了,我把这个重要的项目从 web.config 文件中删除了:

    <services>
          <service name="SARIService.Service1" behaviorConfiguration="ServiceBehavior">
            <endpoint address="" binding="webHttpBinding" contract="SARIService.IService1"     behaviorConfiguration="web">
    
            </endpoint>
    
          </service>
        </services>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-22
      • 2016-07-24
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多