Dendei 0 Newbie Poster

Hey im trying to make my WCF service support HTTPS and it works with HTTP but i've been following this guide http://www.codeproject.com/Articles/24027/SSL-with-Self-hosted-WCF-Service
and successfully created the certificates and i am stuck on the
Configure a Port with an SSL certificate
part i think its because i am not admin of the computer and cant access all netsh commands but im not sure?
but is it necessary to do this step when i use soapclient?

and another problem is that when i try to use WCFtestclient i get error

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.

and if i try to add the metadata line i get error in visual studio instead
my web.config file looks like this

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>

  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Phpwcfconsole.Service1Behavior">
          <serviceMetadata httpsGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="Binding">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="Phpwcfconsole.Service1Behavior"
            name="Phpwcfconsole.Service1">
        <endpoint
          address="https://192.168.5.33:8731/phpwcf/"
          binding="basicHttpBinding"
          bindingConfiguration="Binding"
          name="TestWCFService.Http"
          contract="Phpwcfconsole.IService">
        <identity>
          <dns value="localhost" />
        </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="https://192.168.5.33:8731/phpwcf/" />
          </baseAddresses>
        </host>
      </service>
    </services>
  </system.serviceModel>
</configuration>

with the metadata line i get this error in visual studio

Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [https].

so how do i make the metadata compatible with HTTPS?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.