【发布时间】:2011-08-17 18:38:14
【问题描述】:
我有一个 WCF 服务在我的本地机器上运行良好。我把它放在服务器上,我收到以下错误:
接收时发生错误 HTTP 响应 http://xx.xx.x.xx:8200/Services/WCFClient.svc。 这可能是由于服务 不使用 HTTP 的端点绑定 协议。这也可能是由于 HTTP 请求上下文被中止 服务器(可能是由于 服务关闭)。见服务器 日志以获取更多详细信息。]
我已经访问了 url 中的服务,它工作正常。我为该函数所做的只是将字符串返回到图像名称,因此传递的数据并不多。我跟踪了日志,它给了我相同的信息。这是我的客户端配置:
<binding name="basicHttpBinding_IWCFClient" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<endpoint name="basicHttpBinding_IWCFClient"
address="http://localhost:4295/Services/WCFClient.svc"
binding="basicHttpBinding"
bindingConfiguration="basicHttpBinding_IWCFClient"
behaviorConfiguration="WCFGraphicManagementTool.Services.ClientBehavior"
contract="WCFClient.IWCFClient" />
这是我的服务器配置:
<service behaviorConfiguration="WCFGraphicManagementTool.Services.WCFClientBehavior"
name="WCFGraphicManagementTool.Services.WCFClient">
<endpoint name="basicHttpBinding_IWCFClient"
address=""
binding="basicHttpBinding"
contract="WCFGraphicManagementTool.Contracts.IWCFClient" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
<behavior name="WCFGraphicManagementTool.Services.WCFClientBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceThrottling maxConcurrentCalls="120" maxConcurrentSessions="120"
maxConcurrentInstances="120" />
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
因为它在我的本地机器上工作,所以它会是服务器上的设置吗?
【问题讨论】:
-
我解决了我在这里解释的问题:stackoverflow.com/questions/5537794/…
-
看来你比我走得更远。也许你可以给我一个指示下一步该做什么。 stackoverflow.com/questions/16628382/…
-
您是否有机会接受任何答案,因为我怀疑您是否还在等待获得答案? :)
标签: wcf exception-handling wcf-binding net.tcp wcf-endpoint