服务无法处理的请求由于内部错误

xiangyu2341 2010-04-08 10:47:09
我在调用WCF的时候遇到如下错误怎么办。
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 <serviceDebug> 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.
...全文
62 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
CMIC 2010-04-08
  • 打赏
  • 举报
回复
你的服务代码有错误,在服务上加上[ServiceBehavior(IncludeExceptionDetailInFaults = true)]
属性,就能看到在客户端看到具体的错误了。
xray2005 2010-04-08
  • 打赏
  • 举报
回复
都不晓得你具体异常是什么。

把你WCF服务端的Exception改成new FaultException 抛出以便客户端可以知道具体的错误信息。

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧