I was in the process of converting an http application to https and ssl with a self-signed certificate.
for some reason I have to go to the browser on localhost: ##### in order to start the service.
As soon as the service is started, I test it with the following call at the visual studio 2012 command prompt:
svcutil.exe https:
and he comes back with
Error: Cannot obtain Metadata from https://localhost:10201/?wsdl 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:10201/?wsdl Metadata contains a reference that cannot be resolved: 'https://localhost:10201/?wsdl'. Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:10201'. 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:10201/?wsdl There was an error downloading 'https://localhost:10201/?wsdl'. 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. If you would like more help, type "svcutil /?"
Is this a defragment of my success with HTTPS?
My config is as follows:
<system.serviceModel> <services> <service name="DuplexService.DuplexService" behaviorConfiguration="sb"> <endpoint address="basic" binding="customBinding" bindingConfiguration="customDuplexBinding" contract="DuplexService.Interface.IDuplexServiceContract"> </endpoint> <endpoint address="" binding="webHttpBinding" behaviorConfiguration="webHttpEndpointBehavior" bindingConfiguration="webHttpsBinding" contract="Interface.IPolicyRetriever"> </endpoint> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"> </endpoint> <host> <baseAddresses> <add baseAddress="https://localhost:10201" /> </baseAddresses> </host> </service> </services> <behaviors> <endpointBehaviors> <behavior name="webHttpEndpointBehavior"> <webHttp /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="sb"> <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://localhost:10201"/> <serviceDebug includeExceptionDetailInFaults="true"/> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> <serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="200" maxConcurrentInstances="200" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <webHttpBinding> <binding name="webHttpsBinding"> <security mode="Transport"> <transport clientCredentialType="None" /> </security> </binding> </webHttpBinding> <customBinding> <binding name="customDuplexBinding"> <pollingDuplex duplexMode="MultipleMessagesPerPoll" maxOutputDelay="00:00:01" serverPollTimeout="00:01:00" inactivityTimeout="02:00:00" maxPendingMessagesPerSession="2147483647" maxPendingSessions="2147483647" /> <binaryMessageEncoding> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binaryMessageEncoding> <httpsTransport maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="StreamedResponse" /> </binding> </customBinding> </bindings> <extensions> <bindingElementExtensions> <add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexElement, System.ServiceModel.PollingDuplex" /> </bindingElementExtensions> </extensions> </system.serviceModel>
How can I get rid of it? and get metadata to work and GET to work?
source share