WCF service does not work with ssl

Last post 04-14-2009 1:08 PM by Enkee. 2 replies.

Sort Posts:

  • WCF service does not work with ssl

    04-14-2009, 3:10 AM
    • Member
      point Member
    • Enkee
    • Member since 04-14-2009, 2:47 AM
    • Posts 2

     Hi

    I have a virtual machine named "work" and I created my site on it.

    In my site I have several services for java script operations.MessageService.svc for instance.

    When I type http://work/Messages/MessageService.svc/jsdebug everything work fine an I get java script asp.net generated code for MessageService class.

    Other parts of site also work as expected (pages and services).

    Then I installed ssl certificate made by makecert.exe There is normal scheme with parent certificate installed on my machine and on "work" and child certificate for ssl installed on "work".

    And then WCF service disappeared. Pages are generated fine, but  When I type httpS://work/Messages/MessageService.svc/jsdebug I get The resource cannot be found.

    What should I do? What I configured incorrectly?

    Please help !

     

    Filed under:
  • Re: WCF service does not work with ssl

    04-14-2009, 6:30 AM
    Answer
    • All-Star
      26,953 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,561

    Hi,

    Implementing SSL with WCF

    It should now be understood that HTTP transport security (or SSL) is provided externally to WCF.
    There are two choices, and the deciding factor is how your application is hosted:

    If you are using Internet Information Services (IIS) as your WCF host,
    use the IIS infrastructure to set up an SSL service.


    If you are creating a self-hosted WCF application,
     you can bind a SSL certificate to the address using the HttpCfg.exe tool.


    Using IIS for Transport Security
    IIS 7.0
    To set up IIS 7.0 as a secure host (using SSL), see http://technet2.microsoft.com/WindowsServer/en/Library/70c33ea8-4192-4110-be70-a11e11984f1e1033.mspx.

    To configure certificates for use with IIS 7.0, see http://technet2.microsoft.com/WindowsServer/en/Library/bf4afb4c-4ce3-40e1-bd4b-d7df6daeb9b61033.mspx.

    IIS 6.0
    To set up IIS 6.0 as a secure host (using SSL), see http://technet2.microsoft.com/WindowsServer/en/Library/0c828f40-a479-44a2-9b82-4653896c86281033.mspx

    To configure certificates for use with IIS 6.0, see http://technet2.microsoft.com/WindowsServer/en/Library/3860f52e-f729-4449-a9e9-078a48dc8c951033.mspx.

    Using HttpCfg For SSL
    If you are creating a self-hosted WCF application, download the HttpCfg.exe tool here: http://support.microsoft.com/?kbid=838079

    For information about using the HttpCfg.exe tool to set up a port with a X.509 certificate, see How To: Configure a Port With An SSL Certificate.

    Hope It Helps

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: WCF service does not work with ssl

    04-14-2009, 1:08 PM
    Answer
    • Member
      point Member
    • Enkee
    • Member since 04-14-2009, 2:47 AM
    • Posts 2

     Hi Contributor

    Your post just killed my http to https redirector in global.asax Smile

    The real solution is located there http://weblogs.asp.net/srkirkland/archive/2008/02/20/wcf-bindings-needed-for-https.aspx

    Your post eventually helped me to locate this solution and thanks for that.

Page 1 of 1 (3 items)