Why do web service or HTTP handler calls give two unauthorized errors and then a single success?
-
06-07-2019 - |
Question
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?
Solution
It is performing a negotiation for NTLM authorization. Check on the MSDN on Microsoft NTLM: http://msdn.microsoft.com/en-us/library/aa378749.aspx
OTHER TIPS
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.
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.