How to resolve WCF CommunicationException was unhandled
I have some problems.
the issue is CommunicationException
error.
error message is
An error occurred while receiving the HTTP response to http://localhost:18080/WCFServices/TestService. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
I wrote below source code.
TestServiceClient client = new TestServiceClient();
TestSettings[] voltages = client.GetTestSettings();
Error message appears above tilt word.
I want to synchronize Main Application and Client Application.
Above error is Client Application.
My app.config file is
<?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="wsHttpBindin开发者_如何学编程g" bindingConfiguration="WSHttpBinding_ITestService"
contract="TestServiceReference.ITestService"
name="WSHttpBinding_ITestService" />
</client>
</system.serviceModel>
</configuration>
ps. TestService is modified that is temporarily
please anyone.
thanks.
oh sorry, error occurred on "voltage"
I tried to increase maxsize and length.
but, it didn`t resolve this issue.
somebody help me.
Without seeing your server side config it's going to be hard to help you troubleshoot.
Having said that, one of the things you can do to get the real underlying exception (you're not seeing what's really going on) is to configure WCF Tracing. Just drop that config snippet in the config file on your server side, and look through the logs generated. That should point you to the real problem. Make sure to take it back out when you're finished.
精彩评论