I have a regular WCF service hosted on IIS Express in Visual Studio 2010. IIS Express is configured to use SSL.
Before switching to SSL, I had no problems, but now I can’t update by adding a service link to my WCF service (which is a regular svc file for IIS).
When I use WCFTestClient, I get a slightly more useful error:
Error: Can not retrieve metadata from https: // localhost: 44302 / Services / TrueChecksService.svc If this is a Windows (R) Communication Foundation service that you have access to, be sure to enable publication metadata at the specified address. For help including metadata publishing, see the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455 . Metadata Exchange Error URI: https: // localhost: 44302 / Services / TrueChecksService.svcThe metadata contains a link that cannot be resolved: "https: // localhost: 44302 / Services / TrueChecksService.svc". Failed to establish trust for the SSL / TLS secure channel with the localhost: 44302 authority. The main connection was closed: Failed to establish trust for the SSL / TLS secure channel. The remote certificate is invalid according to the validation procedure. GETTP error URI: https: // localhost: 44302 / Services / TrueChecksService.svc An error occurred while loading 'https: // localhost: 44302 / Services / TrueChecksService.svc. The main connection was closed: Failed to establish trust for the SSL / TLS secure channel. The remote certificate is invalid according to the verification procedure.
Here is my configuration:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="MyBasicHttpBindingConfig" receiveTimeout="00:15:00"
sendTimeout="00:15:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="TrueChecksService" behaviorConfiguration="TrueChecksServiceBehavior">
<endpoint binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBindingConfig"
name="TrueChecksServiceEndpoint" contract="TrueChecksAdminSL.Web.Services.ITrueChecksService" />
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="TrueChecksServiceBehavior">
<useRequestHeadersForMetadataAddress>
<defaultPorts>
<add port="44302" scheme="https"/>
</defaultPorts>
</useRequestHeadersForMetadataAddress>
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
, IIS Express ? , , IIS, , .
.