I'm having a problem with IIS then.
My script uses REMOTE_USER but checks to see if it exists beforehand. If it doesn't the script prints an error message. I've been running this script all day now, and sometimes REMOTE_USER is set, and other times it isn't.
I'm using IIS with Integrated Windows Authentication and anonymous access with a specified user ID.