I have a service with the following binding:
<bindings>
<mexHttpsBinding>
<binding name="MetadataHTTPSBinding" />
</mexHttpsBinding>
<basicHttpsBinding>
<binding name="BasicHTTPSBinding" maxBufferPoolSize="2147483646" maxBufferSize="2147483646" maxReceivedMessageSize="2147483646" messageEncoding="Mtom" />
</basicHttpsBinding>
</bindings>
<services>
<service name="MyNameSpace.PDFGenerator">
<endpoint address="" binding="basicHttpsBinding" bindingConfiguration="BasicHTTPSBinding" name="DataEndpoint" contract="MyNameSpace.IPDFGenerator" />
</service>
</services>
Whenever I use the WCF Test client, the service adds fine. Whenever I visit the service URL in IE, it is not displaying in errors or warnings about the certificate not being trusted. However, I am still getting a problem whenever I try to add the service within visual studio in the Add Service Reference dialog.
There was an error downloading 'baseurl/services/PDFGenerator.svc/_vti_bin/ListData.svc/$metadata'. The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host Metadata contains a reference that cannot be resolved: 'baseurl/services/PDFGenerator.svc'. An error occurred while making the HTTP request to baseurl/services/PDFGenerator.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. The underlying connection was closed: An unexpected error occurred on a send. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. An existing connection was forcibly closed by the remote host If the service is defined in the current solution, try building the solution and adding the service reference again.