It depends on the game.
For the armed forces, I can get away with asking for service number (You would be amazed at how many John Smith's there are!) before dismissing, because I already have their names on the teamsheet. Bit unpersonal, but players know that I can confirm whether they've provided false information to me or not - their managers warn them (Likewise, other referees will ask me to confirm their service number as well).
For regular football, I will clock their shirt number and ask them their surname, then let them know they're being sent off. I'm a fairly broad fella, so players generally have to think twice before thinking about trying anything physical.