I was trying to create a new web site on IIS7 today, for one of our customers, and I wanted to create a new MIME type of .aspx. Every time I clicked the Ok button it kept giving me the following error: Error: Cannot write configuration file due to insufficient permissions.
I first thought that I hadn't given IUSR and IIS_USER access to the folder, but I still received the message. In the end I realised that the file, web.config, was still checked into Team Foundation Server, which meant the read flag was still set on the file.
Once I removed the read flag, I could save the new MIME type!