문제

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/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top