【问题标题】:null exception returned from wcf method从 wcf 方法返回 null 异常
【发布时间】:2012-10-13 01:35:59
【问题描述】:

我正在使用带有 RIA 域服务的 silverlight 应用程序。 在该域服务中,我公开了一个 SOAP 端点,以便我可以通过 SOAP 调用域服务方法。我在 web.config 文件中做了类似下面的操作。

<system.serviceModel>
  <domainServices>
    <endpoints>
      <add name="soap" type="Microsoft.ServiceModel.DomainService.Hosting.SoapEndpointFactory, Microsoft.ServiceModel.DomainService.Hosting" />
    </endpoints>
  </domainServices>
<system.serviceModel>

一切正常。当我从本地 ASP.net 服务器上的 Visual Studio 启动我的服务时,我可以将正确的异常返回给我的客户端。但是当我使用相同的 web.config 文件在 IIS 中托管这个域服务时,我得到了空异常。 有什么想法吗?

【问题讨论】:

    标签: wcf wcf-ria-services ria


    【解决方案1】:

    我想通了。在 web.config 文件中设置 customErrors mode=false 就可以了。

    【讨论】:

      猜你喜欢
      • 2013-05-03
      • 1970-01-01
      • 2018-02-19
      • 1970-01-01
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多