locked
Securing WCF services hosted on windows service RRS feed

  • Question

  • Hi all,

    I have created a wcf service which I have hosted it on windows service.

    the service endpoint address is

    http://localhost:8000/DataExchange/
    

    I can access the service in the same machine using the same EP address or from a different pc by replacing localhost with the IP address as

    http://ipaddress:8000/DataExchange/
    

    Now when I enable https by changing the EP to

    https://localhost:8000/DataExchange/
    

    and changing mex settings and also providing ssl certificate in that port

    it is accessible in the same machine but not from a different machine.

    Any help is useful. Thanks in advance,

    Dheena


    Dheena
    Tuesday, January 24, 2012 11:27 AM

Answers

  • Copy the certificate (after exporting it) from the service machine to the remote client. Do not recreate it with makecert...
    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    • Proposed as answer by Peter Borremans Wednesday, January 25, 2012 9:59 PM
    • Marked as answer by Yi-Lun Luo Monday, January 30, 2012 9:04 AM
    Tuesday, January 24, 2012 12:23 PM

All replies

  • Are you using a self-signed certificate? Maybe this is not trusted on the remote machine... This will leed to exceptions.

    Check the certificate on the remote machine... if necessary add it to the trusted root store (only do this for testing!).


    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    Tuesday, January 24, 2012 11:54 AM
  • Yes I am using self signed certificates (For testing purposes only), but I created the same certificate on remote machine using makecert and moved the CA certificate to trusted root store, but still no luck
    Dheena
    Tuesday, January 24, 2012 12:12 PM
  • Copy the certificate (after exporting it) from the service machine to the remote client. Do not recreate it with makecert...
    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    • Proposed as answer by Peter Borremans Wednesday, January 25, 2012 9:59 PM
    • Marked as answer by Yi-Lun Luo Monday, January 30, 2012 9:04 AM
    Tuesday, January 24, 2012 12:23 PM