The U.S., once, and I'm a US citizen who travels (and was traveling) on a US passport. I was in Toronto, I think, or perhaps Montreal, visiting a client. The US boarder agent asked me the identity of my client, which I declined to provide (it's subject to attorney/client privilege and I can't waive the privilege with permission from the client). The agent told me, "You're not coming home unless you tell me who your client is." I finally negotiated a compromise, agreeing to tell him what the client did without naming the client.
Moron.