views:

304

answers:

3

When accessing an application I've written FireBug shows that each call to a web service or HTTP handler is attempted three times, and the first two times show as '401 Unauthorized' even though they return the correct result. This consistent. Every call does this same thing.

Any ideas why this happens?

A: 

Are you sure that the calls that return 401 are also returning the correct result? They should not be.

This sounds like a negotiation for authorization.

John Saunders
+1  A: 

This occurs (in certain setups) when accessing an IIS server marked as Integrated Windows Authentication.
This occurs only when using NTLM (and not Kerberos), it's part of the NTLM authentication process.

AviD
+2  A: 

It is performing a negotiation for NTLM authorization. Check on the MSDN on Microsoft NTLM: http://msdn.microsoft.com/en-us/library/aa378749.aspx

Michael Kniskern