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.

这个等于没有说,一方面这是为了安全,但是在开发阶段,这个就太痛苦了。

如下的文件

  <behavior name="calculatorServiceBehavior">
                  <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>

添加serviceDebug ,可以使异常抛到客户端来,直接查看就可以了。

服务器端有个异常折腾了我一天,原来是文件找不到,要是能看到这个技巧,几分种就搞定了。

另外,还有一个技巧,直接用Attach To Process 附加进程的办法,把服务器进程加进来,也可以调试,不知道怎么的,今天的自己真是太聪明了,这个办法也能想到。

大部分工作的时候,精力集中,大脑缺氧,反应迟钝,看来还是要好好休息才行。

 

工作累了就要好好休息,把工作时间缩短,提高效率。但是,老板在你身边,你还是要老实的干活,没法缩短工作时间。要是在家里,估计8个小时的活,4个小时可以搞定,

转载于:https://www.cnblogs.com/JamesLi2015/archive/2010/01/28/1658745.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值