This is kind of a dumb question, but I can't seem to find the answer on google.
I'd like to protect my开发者_JAVA技巧 REST enabled WCF service WSDL with https username and password logon (like my Linksys router prompts me to enter when I navigate to 192.168.1.1).
I'm already using a BasicAuthenticationRequestInterceptor with the WCF Rest Starter Kit...and that allows me to have the client use classic http header based authentication...but that doesn't seem to get me to the point where the user is prompted to enter a username and password when they go to http://mysite.com/services/myserivce.svc...
How do I do this?
Thanks.
If you don't want to publish your WSDL then you can remove [serviceMetadata] element from your configuration. As marc_s suggested, you may use IIS provided security (Basic Authentication/Windows Authentication etc) to secure your URLs. Yet another approach would be to expose your metadata across secure end-point. See this MSDN article for the same: Custom Secure Metadata Endpoint. There, certificate has been used but I am sure you can modify it to support basic authentication.
精彩评论