I have found something similar. Seems each time I create a named pipes endpoint, I get the above <certificateRefernce> elements auto included in the app.config. Deleting seems to address the issue.