WCF“服务器未提供有意义的答复". [英] WCF "The server did not provide a meaningful reply"

查看:233
本文介绍了WCF“服务器未提供有意义的答复".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里没有主意,所以我希望有人可以提供帮助.这是我所拥有的:

I am out of ideas here, so I'm hoping someone can help. Here is what I've got:

  • 仅具有basicHttpBinding终结点的WCF服务.
  • 只有一个服务接口,其他所有[DataMember],[FaultContract]都是具体类型.
  • 当我直接从Visual Studio(使用WCF测试客户端或我的自定义应用程序)运行它时,一切正常(我发送请求并获得响应).通常需要一两秒钟.
  • 我将其发布到IIS 6服务器.
  • 我可以成功打开 http://server/WebService/WebService.svc?WSDL
  • 我可以成功打开 http://server/WebService/WebService.svc/mex (与上述输出相同)
  • WCF测试客户端和我的自定义应用程序可以成功添加服务引用
  • 每当我尝试调用服务方法时,它都会等待约15秒钟,然后出现可怕的无意义的回复"错误.
  • 我跑了Fiddler,结果是202,这似乎很成功.
  • 返回的字节数不超过65536个
  • 它正在返回一个数组,但是它很小
  • 我尝试了远程调试,但是可能由于防火墙而无法正常工作(但是端口80是开放的,我可以使用WSDL)
  • 我没有启用system.diagnostics.
  • 我有一个IErrorHandler,通常不会记录任何东西.
  • A WCF service that only has a basicHttpBinding endpoint.
  • There is only a service interface, all other [DataMember], [FaultContract] are concrete types.
  • When I run it straight from Visual Studio (using WCF Test Client or my custom app) everything works (I send a request and get a response). This usually takes a second or two.
  • I published it to an IIS 6 server.
  • I can successfully open http://server/WebService/WebService.svc?WSDL
  • I can successfully open http://server/WebService/WebService.svc/mex (same output as above)
  • The WCF Test Client and my custom app can successfully add the service reference
  • Whenever I try to call a service method it waits for about 15 seconds and I get the dreaded "no meaningful reply" error.
  • I ran Fiddler and I got a 202 result, which would seem like a success.
  • It's not returning more than 65536 bytes
  • It's returning an array, but it is small
  • I tried remote debugging, but can't get that to work, probably due to a firewall (but port 80 is open, I can get the WSDL)
  • I enabled system.diagnostics, nothing.
  • I have an IErrorHandler which normally logs things, nothing.

这是端点配置:

<endpoint address="" binding="basicHttpBinding" contract="Enterprise.IMyService" bindingNamespace="http://ourdomain.com/MyService/">
  <identity>
    <dns value="localhost" />
  </identity>
</endpoint>

还有什么我可以尝试的吗?这可能是某个地方的简单设置,但我无法弄清楚.

Anything else I can try? It's probably a simple setting somewhere, but I can't figure it out.

原始提琴手的反应:

HTTP/1.1 202 Accepted
Date: Thu, 15 Apr 2010 19:02:45 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0

推荐答案

我知道了!它与WCF无关.当我将其移至服务器时,数据库连接字符串不再有效.错误记录(发送到电子邮件)配置也不再有效,并且正在吞噬异常.响应花费了15秒,因为这就是SQL Server连接超时所需的时间.

I figured it out! It had nothing to do with WCF. When I moved it to the server the database connection string was no longer valid. The error logging (to e-mail) configuration also was no longer valid and was eating the exception. It took 15 seconds to respond because that's how long the SQL server connection took to time out.

这篇关于WCF“服务器未提供有意义的答复".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆