- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我有一个运行良好的 WCF 服务,但我不知道发生了什么变化。
我得到这个异常:
System.ServiceModel.FaultException: The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.
这很令人困惑,因为我正在运行 .NET 4.0。
我在哪里打开 IncludeExceptionDetailInFaults
?我正在努力寻找它。
最佳答案
定义一个 behavior在您的 .config
文件中:
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="debug">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
...
</system.serviceModel>
</configuration>
然后按照以下方式将行为应用于您的服务:
<configuration>
<system.serviceModel>
...
<services>
<service name="MyServiceName" behaviorConfiguration="debug" />
</services>
</system.serviceModel>
</configuration>
您也可以通过编程方式设置它。参见 this question .
关于c# - 在服务器上打开 IncludeExceptionDetailInFaults(来自 ServiceBehaviorAttribute 或 <serviceDebug> 配置行为),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8315633/
我有这个简单的测试项目只是为了测试 IncludeExceptionDetailInFaults 行为。 public class Service1 : IService1 {
我如何添加 IncludeExceptionDetailInFaults = true;到下面的代码。我需要获取 Web 服务抛出的 FaultException 的详细信息。目前我没有得到任何细节。
如何使用 Python/SUDS 设置 IncludeExceptionDetailInFaults?对于我的一个请求,我收到此错误消息: File "/usr/local/lib/python2
如何在不使用 App.Config 的情况下在代码中设置 IncludeExceptionDetailInFaults? 最佳答案 是的,当然 - 在服务器端,在您打开服务主机之前。但是,这需要您自行
我有一个运行良好的 WCF 服务,但我不知道发生了什么变化。 我得到这个异常: System.ServiceModel.FaultException: The server was unable to
我遇到了这个异常。 The server was unable to process the request due to an internal error. For more informatio
我是一名优秀的程序员,十分优秀!