I've got a Windows Communication Foundation service that I'm hosting in IIS 6 and running over SSL using a certificate that I created using selfssl. I'm able to view the .svc with no errors in IE but when I tried to add a service reference to it in Visual Studio I got the following error:
Error: Cannot obtain Metadata from https://localhost:777/AuthService.svc
If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error
URI: https://localhost:777/AuthService.svc
Metadata contains a reference that cannot be resolved: 'https://localhost:777/AuthService.svc'.
Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:777'.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.
HTTP GET Error
URI: https://localhost:777/AuthService.svc
There was an error downloading 'https://localhost:777/AuthService.svc'.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.
I checked the article it referenced in the error message and I can't find anything I've got setup wrong. Thanks in advance for any help. Here's my config file:
<
system.serviceModel>
<
bindings>
<
wsHttpBinding>
<
binding name="sslTest">
<
security mode="Transport">
<
transport clientCredentialType="None"/>
</
security>
</
binding>
</
wsHttpBinding>
</
bindings>
<
services>
<
service name="HEI.Auth.BL.AuthUtil" behaviorConfiguration="myServiceBehavior">
<
endpoint
address=""
binding="wsHttpBinding"
bindingConfiguration="sslTest"
contract="HEI.Auth.BL.Interfaces.IAuthenticate" />
<
endpoint contract="IMetadataExchange" binding="mexHttpsBinding" address="mex"/>
<
host>
<
baseAddresses>
<
add baseAddress="https://localhost:777/AuthService"/>
</
baseAddresses>
</
host>
</
service>
</
services>
<
behaviors>
<
serviceBehaviors>
<
behavior name="myServiceBehavior">
<
serviceMetadata httpsGetEnabled="true" httpsGetUrl=""/>
</
behavior>
</
serviceBehaviors>
</
behaviors>
</
system.serviceModel>