I just ran my head against the wall with a really strange Authentication problem. Well in retrospect, not all that weird, but I was about to throw the computer out the window… <g>
I've been having issues with running out of IIS connections while debugging and running various AJAX based applications locally. I'm not exactly sure why this happens but I suspect each XMLHttp session starts a new session against the server and IIS tries to keep the connection to the client open because of HTTP Keep-Alives.
So I figured it might be a good idea to close down Http-Keep Alives on the Web Server altogether. After all I'll use the local server only for debugging so nothing lost. Turned it off and went on with my day.
I'm still in the process of moving all my shit over from another machine onto this new laptop and it's slow going. One thing at a time. Databases, Web Applications that need to be reconfigured, missing files, you name it's a tedious process. So I got to the point of returning of setting up my development West Wind Web Store site. Set up the database and try to hook up to the admin page to reset the connection defaults and… SPLAT!
Nope can't get there. The Admin directory access is not working. I've got Windows Auth configured and locked the directory down by removing IUSR_ from the user list. This should work just fine, but IE, FireFox and IIS do not want to make this work. IE throws me back a DNS error without even bothering with a logon dialog. FireFox pops the Auth dialog box, but it fails after 3 attempts and doesn't accept my log on. WTF?????????
So I hook up Fiddler to see what's going over the wire. All looks well – IIS is prompting for NTLM auth and IE is replying with the token request – it all looks right, but with Fiddler the connection fails midway through the auth conversation – just locks up and stops. No message, just stops.
Aaargh…
This always works and I'm going crazy because I simply don't see anything wrong. And then – I take another look at the server's message that's sent out and notice the Connection-close. Sure enough, the Connection close – caused by disabling HTTP Keep-Alives – is what's causing the Auth connection to completely fail.
Now that's kind of a scary thought. I re-enable the Keep Alives and sure enough everything starts working as expected. How's that for a nice way to waste an hour +. No shit…
This got me thinking about my original problem with XP running out of connections. Obviously disabling the Http Keep-Alives isn't going to work. Using Conection close from the client also isn't going to work for the same reason, so I'm back to my original problem of me having to shut down IIS on XP to reset connections. Bummer.
Other Posts you might also like