none
WebHttpBinding and HTTPS RRS feed

  • Question

  • Hi,

    We want to implement a REST service over HTTPS.

    We have a one working over HTTP, but there are problems while porting to HTTPS.

    Questions:

    1. Does WCF support :

    <protocolMapping>
                <add scheme="https" binding="webHttpBinding" />
        </protocolMapping>

    If yes, is it after a specific .Net version? i.e. Net 4.5 onwards etc?
    Is it supported in Net 4.0?

    2. Is the above supported for all kind of applications (e.g. self-hosted) and not only for IIS hosted?

    I have a self-hosted sample application on Net 4.0,  but the above scheme is not working.

    More details can be found in this thread:

    Earlier thread on using HTTPS

    3. If we have to use HTTPS with WebHttpBinding, then do we need necessarily go through the IIS route?

    Thanks,

    Sahil

    ================== it worked after I added the following in code ==========

     ServiceEndpoint endpoint  = sh.AddServiceEndpoint(c, b, String.Empty);
                    //sh.AddServiceEndpoint()
    
                    endpoint.Behaviors.Add(new WebHttpBehavior());
    

    Now the HTTPS version is working.

    Monday, November 9, 2015 2:44 PM

Answers

  • Hi Sahil Rangari,

    According to this case, For >>Is it supported in Net 4.0? I refer some support documents,

    It is supported in Net 4.0.

    For more information, please refer to the following article:

    1.<protocolMapping>

    It supported .Net Framework 4.0.

    Best Regards,

    Grady

    Tuesday, November 10, 2015 5:28 AM
    Moderator

All replies