Long-running Ajax call returns http status 401
I have an asp.net page that loads, then makes am ajax call that can take some time. Sometimes the call times out. This is expected in some cases where data is less than perfect. I have been noticing that it will actually prompt for the end users username and password. This seems new: This page has been making this call with no 401 errors like this for several years and I have not heard reports of this behavior. When I look in fiddler, I see that the web server is returning 401.1 errors when the web service call is made. More info: This is an ASP.NET page calling a local web service. Here 开发者_开发技巧the script manager:
<ajax:ToolkitScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="5000">
<Services>
<asp:ServiceReference Path="~/WebService/DataWebService.asmx" />
</Services>
</ajax:ToolkitScriptManager >
Here is the call to the WS:
WSNameSapce.WebService.set_timeout(2000000)
WSNameSapce.DataWebService.GetValues('<%=Current.AccountId%>',displayResult, displayErrorMessage);
The websits uses IIS2 win server 2003, and is configured to use Anonymous Authentication.
The web service calls some stored procs and makes some (WCF) webservce calls. When the procs/WS calls take a long time. I see thread aborted exceptions, and I am prompted to provide my windows login info: as though Basic authentication was configured. I understand everything up to the when i am prompted to provide my windows login. If the Webservice times out, I should get a 500 error, which my code handles.
Any help usderstanding why users are being prompted for a login, and how I can prevent thi from happening would be appreciated.
The dreaded 401.1. You are failing to authenticate via NTLM somewhere in your pipeline. Make sure you can authenticate on all your endpoints.
401.1 and 401.2-Authentication Problems
精彩评论