Sunday, October 18, 2015

WCF Surprise: Renamed Machines Temporarily Use Old SAM Name

Recently, I was messing around with WCF's impersonation/identification feature on machine accounts, i.e. with WCF clients running as SYSTEM on their respective machines. Meanwhile, I noticed that a machine had a wrong name; I must have forgotten to change the WDS naming scheme before deploying to it. So I changed the name and rebooted as suggested. When the machine came back up, I was surprised to learn that it was still identifying to other machines with its old name.

The server checks the client computer's name by reading ServiceSecurityContext.Current.WindowsIdentity.Name, which produces the name in NetBIOS form, DOMAIN\MACHINE$. Puzzled, I checked the Active Directory record for the machine, and all relevant attributes had been updated to reflect the change. The computer itself displayed the new name in system properties. The WCF server application had been restarted (for other reasons) since the change. Therefore, I have no idea why it was seeing the old name.

If you know what's going on, feel free to leave a comment or answer my Server Fault question.

No comments:

Post a Comment