I use vinager for everything. Sometimes straight vinager but more often than not it is diloted with water of variting degrees. It's just abrasive enough. Once the majority is removed use the vinager to make it just like new.
My grandpa always took off the solenoid and either blew real hard on it, or used a old tooth/denture brush on it to clean it up. Most of the time it worked, sometimes you just need to replace it.
Most solenoids are sealed assemblies but if it's possible to get at the contacts, you can clean them with very fine sandpaper and/or an old fashioned typewriter eraser.