【发布时间】:2014-01-31 23:05:56
【问题描述】:
当我尝试从 web 服务加载方法时,我得到一个错误:
“由于内部错误,服务器无法处理请求。有关错误的详细信息,请在服务器上打开 IncludeExceptionDetailInFaults(来自 ServiceBehaviorAttribute 或来自配置行为),以便将异常信息发送回到客户端,或根据 Microsoft .NET Framework SDK 文档打开跟踪并检查服务器跟踪日志”
这是我的 app.config 端点定义:
<services>
<service name="Service" behaviorConfiguration="debug">
</services>
<client>
<endpoint name="Service" address="net.tcp://localhost:12708/" binding="netTcpBinding" bindingConfiguration="netTcp" contract="path.IService" >
<identity>
<servicePrincipalName />
</identity>
</endpoint>
</client>
<serviceBehaviors>
<behavior name="debug">
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
如果我声明了 serviceBehaviors,我将看不到更多信息事件。 有人可以告诉我如何查看有关此错误的更多详细信息吗?
【问题讨论】:
-
启用 WCF 跟踪以查看发生了什么。见stackoverflow.com/a/4271597/870604
-
我已经编辑了你的标题。请参阅“Should questions include “tags” in their titles?”,其中的共识是“不,他们不应该”。