I have a method like this:
[WebGet(UriTemplate = "/")] [OperationContract] public XmlElement All() {}
Is there a way to force clients to always use HTTPS? (deny HTTP and allow only HTTPS)?
If yes, how?
Thank you
This is IIS configuration.
When you're creating the IIS website to host the WCF service, you would set the bindings on it to only respond on the SSL socket.
Furthering that, you can set up IIS to force redirects from http://www.example.com to https://www.example.com
Here's a tutorial: http://learn.iis.net/page.aspx/144/how-to-set-up-ssl-on-iis/
This is IIS configuration.
When you're creating the IIS website to host the WCF service, you would set the bindings on it to only respond on the SSL socket.
Furthering that, you can set up IIS to force redirects from http://www.example.com to https://www.example.com
Here's a tutorial: http://learn.iis.net/page.aspx/144/how-to-set-up-ssl-on-iis/