Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
AppSettings do not usually go in the connectionstrings file/section. I assume you are doing this since you want to encrypt the value? You can split the AppSettings into a separate file/additional file and then try to encrypt that. Also, update your question to provide enough detail to provifde answer, rather than everyone trying to guess what the problem is.
Yes, you could but might be tricky to match/update user accounts, but might be fine for new users. I would recommend the TransferUserPasswords.aspx page though, along with packages/serialization. Went through this process just last week and it was very straight forward.
Traversing the entire content tree like this WILL lead to performance issues. I would not recommend following this approach, instead use the ContentSearch API to perform the query.
Your use of //* descendents query is likely to lead to performance issues too. You should follow the pattern that Richard had provided in the example and specify as much of the interim folder structure as possible.