I have a WPF/WCF application in which I have used external web service by referring .asmx
URL in my solution's Service References folder.
At server side, I have created entries in web.config
as below:
<binding name="ExtractService"
closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:01:00" sendTimeout="00:10:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="524288"
maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="2147483647" maxBytesPerRead="4096"
maxNameTableCharCount="2147483647" />
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<client>
<endpoint name="ExtractService"
address="https://example.com/DataExtractService.asmx"
binding="basicHttpBinding" bindingConfiguration="ExtractService"
contract="ExtractService" />
</client>
Also I have an app.config
entry at client side same as web.config
above.
Everything works fine when I run it in development environment. Maybe because my client and web server (WCF) are on the same machine.
But when I deploy the app on my test server, it starts giving below error. The client is on my machine and the server (WCF) is on other machine in this case.
Message: HandlingInstanceID: 71a85aef-dbb0-4c28-9035-57f8b7526ee0
An exception of type 'System.ServiceModel.EndpointNotFoundException' occurred and was caught.There was no endpoint listening at https://example.com/DataExtractService.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
To solve this, I tried to copy the same configuration in app.exe.config
file at client side, but it does not work.
Where am I missing the client configuration? I also copied the app.config in server's bin folder, but did not help.