How do I encrypt/decrypt an entire XML file in C#/XML? This is not web.config. This is a separate XML file used for storing information about the application. It needs to be encrypted by a configuration utility app I wrote and descrypted by a Windows Service.
The format of the XML file is:
<?xml version="1.0" encoding="utf-8"?><Info><DatabaseServerName>IDEA-PC</DatabaseServerName><DatabaseUserName>sa</DatabaseUserName><DatabasePassword>DarkS..</DatabasePassword><ServiceAccount>.\Admin</ServiceAccount><ServicePassword>admin</ServicePassword><RegistrationCode>81577f58-0e05-43f4-b322-fbf0d9d1e7111</RegistrationCode></Info>I have looked at http://www.ehow.com/how_6101849_encrypt-xml-file-programatically.htmlbut the compiler does not allow
XmlElement orderElem = xmlDoc.SelectSingleNode(\"Order\") as XmlElementIt won't process the \"Order\")