Ask a questionAsk a question
 

AnswerKerberos still accepting NTLM Authentication

  • Thursday, November 05, 2009 4:03 PMsconyelg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hello all. I recently configured my SP farm to use Kerberos authentication. Everything works as expected and when I log on, I can check the server's event viewer to see that Kerberos is being used. However, I recently wrote a "stress test" application that uses NetworkCredentials to send requests. To my surprise, I can set the authentication type of my request to NTLM as well as Negotiate and it still work. I was under the impression the the NTLM request would be rejected. Does this mean my Kerberos configuration is screwed up? Here's my code block for more clarity.
     HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri.ToString());
    
    System.Net.CredentialCache cache = new CredentialCache();
    //using NTLM
    cache.Add(new Uri(uri.ToString()), "NTLM", new NetworkCredential("spuser", "password", "domain"));
    req.Credentials = cache;
    
    //still works!?
    req.GetResponse();
    


    Thanks in advance.
    • Moved byMike Walsh MVPMVP, ModeratorThursday, November 05, 2009 4:12 PMadmin q (From:SharePoint - General Question and Answers and Discussion)
    •  

Answers

All Replies