There are two other common causes:
1) the plastic coated wire basket(s) has nicks or cuts allowing the wire to rust away. The corrosive dishwasher powder then eats away at the exposed rusty wire, leaving spots - particularly depositing on knives and spoons.
2) if you have never run a cleaning cycle with dishwasher/washing machine cleaner then you could have a build up of gunk in the pipework. I use the Electrolux cleaner powder bought from espares and others. Use it in your washing machine too to avoid smells inside and on the clothes.