2

我有一个 wcf 休息服务,当我把它放在 iss7 上并运行给我这个

The server encountered an error processing the request.
See server logs for more details.

但日志什么也没说。所以我的问题是如何解决这些错误?

4

2 回答 2

2

根据我的需要(调试),只需在我的服务行为上将此设置为 true 并得到异常。

<serviceDebug includeExceptionDetailInFaults="false"/>
于 2013-04-03T00:23:30.090 回答
0

您可以使用多种方法来获取详细的错误。基本上,它们的工作原理都与BlaShadow. 这是一篇关于此的博客文章

我知道获得更好错误的 3 种方法:

  1. 设置UseVerboseErrors' inInitializeService' 方法。但是,如果在调用“InitializeService”之前发生错误(发生这种情况),这不会给您任何帮助。

  2. IncludeExceptionDetailInFaults在服务类之前使用属性设置为 true。

  3. IncludeExceptionDetailInFaults使用 web.config设置为 true。

于 2013-07-25T22:50:19.567 回答