The Apple App Store Application has not been working for about a month. In fact, it seems to have stopped just after I did the latest "security" update. Today, I restored the OS from a backup made on June 17. Everything worked just fine until I re-installed the the update: "Cannot connect to the App Store" re-appeared. Trying to sign out of my account reliably creates a crash.
I searched the Internet. Apple is no help. You are told that this may have multiple causes, go through a process with six stops, and then are told to re-install OS X. Stupid question: How do you do that without getting into the App Store (if you have no backup)? And, in any case, there are not multiple possible causes. There is just one, namely the recent security update.
Poking around, I noticed that in the System Preferences App Store Section, there is a checkbox labeled, “automatically download apps purchased on other macs”. It's greyed out (and there is a dash ("-") in the selection box. Underneath, you can read, "Checking if automatic app downloads are enabled" plus a spinning wheel. Whether you enable or disable "Automatically check for updates" makes no difference. The wheel keeps on spinning.
Another good example of Apple's present quality control, I suppose. I do not want to complain, but what can I do. The multiple error reports do not seem to faze Apple, and it is really difficult to get their attention by checking on the forum. What you get is: take these 6 steps; if this does not work, re-install. They should also say that you should not re-install the recent security update either!
As I said before ...
Later that day: 21:01 It's fixed now. I changed the network location from "Automatic" to a new value, called "Home" on the advice of an Apple Website. I wasted a whole day, however. Nor do I know why a security update would change or invalidate this setting.