0

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?

Jim Wilcox
  • 1,480
  • 16
  • 33
  • Does the following help: http://stackoverflow.com/questions/1742938/how-to-solve-could-not-establish-trust-relationship-for-the-ssl-tls-secure-chan ? – Botond Botos Nov 14 '16 at 20:23
  • That would work, but I was hoping to fix the problem rather than patch around it and create a security flaw. – Jim Wilcox Nov 15 '16 at 21:40

0 Answers0