Our requirement is to not check-in code to TFS that includes the username and password for production servers. But, we would still like to use the auto-build feature of TFS to make production deployments. For various reasons, we do not want to encrypt the appSettings in the web.config. Is it possible to put the passwords into the source code directly and to encrypt that single page of source, then check that page into TFS, and then auto-build and deploy an ASP.Net MVC website? Also, we are open to other ideas.
I should also add the username and password are for SAP. Database connection strings are already encrypted inside the connectionStrings block.
Also, would it be smarter to put the username and passwords into an XML file and encrypt that using asymmetric keys? https://msdn.microsoft.com/en-us/library/ms229746.aspx.