locked
Problem with https ssl RRS feed

  • Question

  • I have a simple WCF service hosted in IIS. When I change the configuration to use secure https, it doesn't work.When I run the service in the browser https://localhost/Service1.svc I get "The page cannot be found"....I do have SSL certificate installed in my machine.....what else is missing?

    Please help....thanks in advance....

    here is my code and my web.config file

     

     ====================================================================

     namespace WcfService
    {
        // NOTE: If you change the class name "Service1" here, you must also update the reference to "Service1" in Web.config and in the associated .svc file.
        public class Service1 : IService1
        {
            public string SayHello()
            {
                return "Hello";
            }
        }
    }

     ====================================================================

    namespace WcfService
    {
        // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
        [ServiceContract]
        public interface IService1
        {
            [OperationContract]
            string SayHello();
        }
    }

     

     ====================================================================

        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
            <services>
       <service behaviorConfiguration="WcfService.Service1Behavior"
        name="WcfService.Service1">
         <host>
           <baseAddresses>
             <add baseAddress="https://localhost"/>
           </baseAddresses>
         </host>
        <endpoint address="" binding="customBinding" bindingConfiguration="test" contract="WcfService.IService1">
         <identity>
          <dns value="localhost" />
         </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
       </service>         
      </services>
        <bindings>
          <customBinding>
            <binding name="test">
              <security authenticationMode="UserNameOverTransport"/>
              <binaryMessageEncoding/>
              <httpsTransport transferMode="Buffered"/>
            </binding>
          </customBinding>    
        </bindings>
            <behaviors>   
         <serviceBehaviors>
          <behavior name="WcfService.Service1Behavior">
           <serviceMetadata httpsGetEnabled="true"/>
           <serviceDebug includeExceptionDetailInFaults="false" />
            <dataContractSerializer maxItemsInObjectGraph="2147483647" />       
          </behavior>
         </serviceBehaviors>
      </behaviors>
        </system.serviceModel>

     

    Wednesday, November 18, 2009 5:34 PM

Answers

  •  I was able to get the https running....I had to enable the SSL certificate under  IIS plus, I had to run the silverlight page with https...

     

    Monday, November 23, 2009 11:16 AM

All replies

  • Hi,

    What do you get when opens service in browser over http, not https?

    Did you configure a web site to use ssl in IIS?

    Wednesday, November 18, 2009 5:43 PM
  •  I was able to get the https running....I had to enable the SSL certificate under  IIS plus, I had to run the silverlight page with https...

     

    Monday, November 23, 2009 11:16 AM