WCF存在和部分工作,但对一些通话回报"没有终点的聆听 - (404)未找到&QUOT。 [英] WCF Exists and partially working but for some calls returns "no endpoint listening - (404) Not Found."

查看:258
本文介绍了WCF存在和部分工作,但对一些通话回报"没有终点的聆听 - (404)未找到&QUOT。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有服务,正在与从小到大的数据集(文档生成),以及它的正常工作的几个电话,但对于一些具体要求(相同的方法,不同的参数),它只是返回:

We have service that's working with small to large sets of data (document generation), and it's working fine for some calls, but for some specific requests (exact same method, different arguments) it just returns:

System.ServiceModel.EndpointNotFoundException:有没有终点在听 HTTP ://本地主机:8010 /为MyService / MyService.svc 是可以接受的消息。这通常是由一个不正确的地址或SOAP动作引起的。见的InnerException,如果存在的话,更多的细节。 ---> System.Net.WebException:远程服务器返回错误:(404)未找到

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:8010/MyService/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

请注意,该服务是<强/>工作,产生但我没有说所有的人......(和服务可以从浏览器中打开)文件

Note that the service is working, documents are generated but as I said not all of them... (and service can be opened from browser)

我。已经打开web.config中跟踪(System.Diagnostics程序),并得到了在svclog没有进一步的信息

I've turned on tracing (system.diagnostics) in web.config and got no further info in the svclog.

绑定(wsHttp)被配置为:

The binding (wsHttp) is configured as:

    <binding name="wsHttpWithTrans" transactionFlow="True" messageEncoding="Mtom"  maxReceivedMessageSize="65536000" maxBufferPoolSize="124288000">
      <readerQuotas maxDepth="32" maxStringContentLength="819200" maxArrayLength="16384000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
      </security>
    </binding>

和也,有:

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="124288000" />
  </system.web>
</configuration>



我相信该消息应属于的范围之内 maxReceivedMessageSize ,和其他属性。

目前我怀疑消息的大小,只是不能肯定 - 你有什么想法,我怎么能调试这进一步?

Currently I'm suspicious of the size of the message, but just cannot be sure - do you have any idea how can I debug this further?

推荐答案

我发现使用上的故障排除失败请求使用在IIS 7跟踪(BTW非常酷的东西)

I found what was wrong using instructions on Troubleshooting Failed Requests Using Tracing in IIS 7 (very cool stuff btw)

有,我看到的错误,其实是在 404.13 ,这容易导致我什么是真的错了。内容长度太大

There, I saw that the error was in fact the 404.13, which easily led me to what's really wrong: Content length too large.

在最后,解决办法是把它添加到web配置:

In the end, the solution was to add this to web config:

<configuration>
...
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="204800000" />
      </requestFiltering>
    </security>
  </system.webServer>  
</configuration>

和,同时,确保使用默认的网站不覆盖它:

and, also, make sure that the default web site doesn't override it using:

%WINDIR%\System32\inetsrv\appcmd.exe列表配置默认Web站点-section:的requestFiltering

"%WINDIR%\System32\inetsrv\appcmd.exe" list config "Default web site" -section:requestFiltering

这篇关于WCF存在和部分工作,但对一些通话回报&QUOT;没有终点的聆听 - (404)未找到&QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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