Friday, October 12, 2012

silverlight WCF with NTLM/kerberos authentication

silverlight WCF with NTLM/kerberos authentication

Hi All,

we have implemented an app using silverlight and wcf. we are using STS-secure token service for authentication which is working fine. now we want to implement NTLM/kerberos authentication along with STS.

is it possible to do this ? if yes then how ? what are the configuarations need to be done ?

After doing configuration according to this, i got a popup windows asking for username/password. This popup comes 3 times and after that i am getting an error like :

"The remote server returned an unexpected response: (401) Unauthorized. In Silverlight, a 404 response code may be reported even when the service sends a different error code."

Any help would be greately appriciated.

Thanks

Answers & Comments...

Answer: 1

Hi,

Please refer to this post: http://forums.silverlight.net/t/161024.aspx

The answer is YES, you can use kerberos authentication with Silverlight 4. You can host the Silverlight project on an asp.net project and secure the asp.net project with Windows, NTLM, or Kerberos authentication.

For configuration, please have an look at the links that post provided, or you can refer to:

http://msdn.microsoft.com/en-us/library/dd744835%28v=vs.95%29.aspx

http://support.microsoft.com/kb/215383

Best Regards,



Answer: 2

Hi johnson,

i have tried these links. but it didn't work for me. as i said we  have used STS also. 

do we need to set configuration on STS side ? do we need to configure IIS as well ?

Thanks



Answer: 3

Hi,

Based on my understanding the problem happens when client (Silverlight application) tries to authenticate agains STS. What browser you're using? Are you using IE? Some browsers may not support  NTLM/kerberos well. To troubleshoot this issue you can configure trace on STS side or debug your SIS to see whether the user credentials (username/password) are correctly sent to STS and they are you need to debug to see why they are not considered as a valid ones. If your SIS is based on WCF hosted in IIS a simple way to test is to put a resource in the same virtual directory of your STS. Then let Silverlight application access that resource to see whether this issue can be reproduced.





No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog