I get randomly (not always) "An error occurred while getting an HTTP response on." when calling the SOAP API from the client. This does not happen every time. My application itself is a WCF service.
Client Configuration:
<binding name="AbcBinding" sendTimeout="00:02:45" closeTimeout="00:02:45" openTimeout="00:02:45" receiveTimeout="00:10:00" bypassProxyOnLocal="false" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <security mode="Transport" > <transport clientCredentialType="Basic" /> </security> </binding> <client> <endpoint binding="basicHttpBinding" bindingConfiguration="AbcBinding" contract="AbcContract" name="AbcBinding" /> </client>
code:
var configFactory = new ConfigurationChannelFactory<AbcContract>("AbcBinding"), ConfigFile, "localhost:9198/AbcCall"); #region Basic http authentication if (configFactory.Credentials != null) { var defaultCredentials = configFactory.Endpoint.Behaviors.Find<ClientCredentials>(); configFactory.Endpoint.Behaviors.Remove(defaultCredentials); var loginCredentials = new ClientCredentials(); loginCredentials.UserName.UserName = "UserName"; loginCredentials.UserName.Password = "Password"; configFactory.Endpoint.Behaviors.Add(loginCredentials); }
EDIT In the local environment, it works fine with the following configuration: useDefaultWebProxy="false" proxyAddress="http://127.0.0.1:8888"
But on the deployment server, I get the following error with the above configuration:
There was no listening to endpoints ... that could receive the message. This is often caused by the wrong address or SOAP action. See InnerException, if present, for more details.
source share