I created a wcf service and could SUCCESSFULLY refer it in client application. But the problem comes when I implement X509 certificate.
1) when I change the service to use x509 Certificate, I couldn't create a proxy as the mex end points are not shown in the browser. So in this case, how should I refer the Service in client app, when the service is secured and mex end points are not exposed?
2) Can I use both message and transport security as Certificate? Will this scenario work for basicHttpBinding ? I heard that basicHttpBinding cannot have message security through certificate.
Any help in this regard, will be highly appreciated.
Here is my service model in Service.
<system.serviceModel>
<client>       
  <endpoint behaviorConfiguration="" 
    binding="basicHttpBinding"
        bindingConfiguration="WCFServiceX509Binding" 
    contract="WCFService.Contract.Service.IWCFServiceContract"
        name="WCFServiceClientEndPoint" />      
</client>
<bindings>
  <basicHttpBinding>
    <binding name="WCFServiceX509Binding" maxBufferSize="6553600"
      maxBufferPoolSize="52428800" maxReceivedMessageSize="6553600">
      <security mode="TransportWithMessageCredential">
        <transport clientCredentialType="Certificate" />
        <message clientCredentialType="Certificate" />
      </security>
    </binding>        
  </basicHttpBinding>
</bindings>
<services>
  <service  behaviorConfiguration="ServiceBehavior" 
    name="WCFService.Model.WCFServiceModel">
    <endpoint 
    address="" 
    binding="basicHttpBinding" 
    bindingConfiguration="WCFServiceX509Binding"
        name="WCFServiceBasicHttpEndPoint" 
    contract="WCFService.Contract.Service.IWCFServiceContract">
      <identity>
            <certificateReference findValue="WCFUADOCServer" />
      </identity>
    </endpoint>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ServiceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceCredentials />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="ClientCertificateBehavior">
      <clientCredentials>
        <clientCertificate  findValue="WCFUADOCServer"
                  x509FindType="FindBySubjectName"
                  storeLocation="LocalMachine"
                  storeName="TrustedPeople" />
      </clientCredentials>
    </behavior>
  </endpointBehaviors>
</behaviors>
Thanks so much, Chand.