【发布时间】:2011-04-11 12:37:12
【问题描述】:
我有一些问题。
问题是CommunicationException 错误。
错误信息是
接收时发生错误 HTTP 响应 http://localhost:18080/WCFServices/TestService。 这可能是由于服务 不使用 HTTP 的端点绑定 协议。这也可能是由于 HTTP 请求上下文被中止 服务器(可能是由于 服务关闭)。见服务器 日志以获取更多详细信息。
我在下面写了源代码。
TestServiceClient client = new TestServiceClient();
TestSettings[] voltages = client.GetTestSettings();
错误信息出现在倾斜字上方。
我想同步主应用程序和客户端应用程序。
上面的错误是客户端应用程序。
我的 app.config 文件是
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_ITestService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="209715200"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:18080/WCFServices/TestService"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITestService"
contract="TestServiceReference.ITestService"
name="WSHttpBinding_ITestService" />
</client>
</system.serviceModel>
</configuration>
ps。 TestService 是临时修改的
请任何人。
谢谢。
抱歉,“电压”发生错误
我尝试增加最大尺寸和长度。
但是,它并没有解决这个问题。
谁来帮帮我。
【问题讨论】:
-
请向我们展示您的服务器配置文件。
-
如果您发布代码、XML 或数据示例,请在文本编辑器中突出显示这些行并单击编辑器上的“代码示例”按钮 (
{ })工具栏以很好地格式化和语法突出显示它!如果您发布错误消息,请使用块引号 (` " ` ) 正确格式化错误消息。
标签: wcf wshttpbinding communicationexception