I have an application containing a WCF Data Service using SSL. I have a domain level certificate and a localhost certificate. I am using Local IIS to host the data service. I can access the WCF Service on my computer from another computer using
https://mycomputer.mydomain.com/MYDataService/ServiceName.svc
When I try that on my computer, it says it can't establish a secure connection. From my computer, I can use
https://localhost/MYDataService/ServiceName.svc
and it works. This is fine most of the time, but I have a windows forms application that I use for testing and some maintenance tasks. It is part of the solution containing the web service. To configure the web service, I use the Add Service Reference function and use the Discover feature. It configures the service fine as connecting to localhost. When I run the program, I get the following error:
Could not establish trust relationship for the SSL/TLS secure channel with authority 'mycomputer.mydomain.com'.
I have looked at the Configure Service Reference settings and it says localhost, but according to the error, the client is somehow trying to connect to the actual computer name. Has anyone run into this before?