1

我在 Windows 2003 服务器上部署了 WCF 服务。我们正在使用 WPF 应用程序来使用此服务。问题是如果我们部署一个新版本的 WCF 服务或者让 IIS 和 WPF 应用程序空闲一段时间然后尝试执行一个功能,我们会得到以下异常:

The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 119 bytes of the response were:'<HEAD><TITLE>500: Server Error [20-0004]</TITLE></HEAD>
<BODY>
<H1>500: Server Error [20-0004]<H1>

</BODY>
</HTML>

谢谢并恭祝安康,

4

3 回答 3

1

500 错误通常意味着服务中存在未处理的异常。查看 Windows 事件日志以了解发生了什么。

于 2009-07-23T14:00:25.667 回答
0

当你得到下面提到的错误

500:服务器错误 [20-0004]

这是 Siteminder Web Agent 错误,如果您的网站受 SSO 保护,那么它可能在初始化时存在 Siteminder ISAPI 问题。

检查事件和 SSO 日志。

起源博客

于 2010-08-24T11:34:30.077 回答
0

看起来您正在创建与服务器的代理/连接,然后将其保持打开状态并在需要时使用此代理。

这有两个问题:

  • 由于在不活动期间超时而遇到的问题。
  • 在不使用连接时保持连接会降低可伸缩性。

更好的方法是在需要时创建代理连接,然后在使用气体后关闭/处理它。通常我为此使用 using 语句。

于 2009-07-23T13:58:33.377 回答