iTunes could not connect to the iTunes Music Store

On my MacBook I got this message…

iTunes could not connect to the iTunes Music Store

Tried different versions of iTunes from 7.4.2 to 7.5 and 7.6 but no luck.
I then tried running iTunes on WindowsXP on the same MacBook via Parallels which connected. I installed Little Snitch to see what was happening to the network connections and found out iTunes wasn’t even attempting to connect.

The problem turned out to be a proxy configuration file (PAC) which had been setup in System Preferences | Network | Airport | Advanced | Proxies

As soon as I removed it, the problem disappeared.

iTunes could not connect to the iTunes Music Store

iTunes could not connect to the iTunes Music Store