I've been seeing a lot of this bug on Win XP and 2003 (IIS 5.1 and 6.0).
Basically, the problem is that IIS is configured to serve anonymous requests using a special user account I've created for the purpose (let's call this domain\myaccount), which works fine for a while. After some number of minutes, or hours, it suddenly starts serving those requests using the IWAM_Machinename account instead.
Some possible leads people emailed:
Tim Chaffee finally sent in the suggestion that so far seems to have been the right answer:
"I would look at the MTS/COM+ package that IIS creates when you choose HIGH isolation. What user is that configured to use? It may be IWAM And you may need to switch it to the user you need."
That seems to be it. If you look in the Component Services control panel, it is indeed the case that the COM+ application that IIS created has its identity set to the IWAM_Machinename account. So actually the bug here is that IIS was running my app as domain\myaccount in the first place... it probably should have been running it as IWAM_Machinename.
I've been experimenting with this for a few hours and so far, changing the COM+ application identity in the Component Services control panel has fixed the problem. I'm still not 100% sure why this is the case or whether it's a real fix. If anyone can provide a better explanation for what's going on here I'll be endebted to them.
In the meantime, thanks to Sean Timm, Yakov Shafranovich, Simon Fell, Mike Surel, Sasha Do, Mike Openshaw, Marcus Tucker, Max Skibinsky, Scott Durow, John Christensen, Tim Chaffee, Steven Afdahl, Nick Parker, John Waterson, Beau Hartshorne, Olivier Dagenais, Gil Bahat, Robert MacLean, Nicole Calinoiu, Scott Wisniewski, Matthew Randle, Lars Bergstrom, Sikko2Go, Glenn Deschen, Brendan Tompkins, Bill Loytty, Sean Wheeler, and Justin Bowler for their helpful and intelligent suggestions.
You’re reading Joel on Software, stuffed with years and years of completely raving mad articles about software development, managing software teams, designing user interfaces, running successful software companies, and rubber duckies.
I’m Joel Spolsky, co-founder of Fog Creek Software, a New York company that proves that you can treat programmers well and still be highly profitable. Programmers get private offices, free lunch, and work 40 hours a week. Customers only pay for software if they’re delighted. We make Trello, easy web-based collaboration software, FogBugz, an enlightened bug tracking and software development tool, and Kiln, a distributed source control system that will blow your socks off. I’m also the co-founder and CEO of Stack Exchange. More about me.