Can I consume a WCF REST service using Windows Authentication without .NET libraries?
I have a WCF client hosted in IIS7 and a WCF service hosted in IIS7. The client is strictly http/javascript and I'd like to keep it that way.
When I browse to the client webpage, I'm prompted for Windows Authentication credentials because the page is protected (and served with https). Once I've authenticated, my AJAX calls to the service (from the client) are n开发者_如何学编程ot processed because I'm never given an opportunity to authenticate to the service itself.
What is the best way to implement security if I want to protect access to the service using Active Directory credentials but without using .NET libraries?
The specific response returned by the service is "401 (Unauthorized)". Note that the service is also served with https.
Edit:
Update
There is a security mode for this as described here:
http://rickgaribay.net/archive/2007/04/04/recipe-wcf-basichttpbinding-with-windows-authentication.aspx
Below is for Android
I believe that it is possible. Althought, short of writing a custom implementation of NTML authentication, you will need to use a java third party libary.
I did have success with http://jcifs.samba.org/ running on Android. Unfortunately, I dont have the source code to share any more as we moved to a different authentication method.
I found that project through the following link: http://danhounshell.com/blog/android-using-ntlm-authentication-with-httpclient/
There is also another NTML project for AD integration which might help (i have no experience):
http://www.ioplex.com/jespa.html
hth
精彩评论