Click-Once - How to encrypt connection strings [duplicate]
问题 This question already has answers here : .Net Encryption (4 answers) Closed 5 years ago . I have a WPF application with connections strings stored in the App.config. What is the best way of encrypting these connection strings in a click-once deployment? Thanks 回答1: If this is a connectionString that will be configured and used on a single computer (not shared across multiple computers) by an instance of your application, you can use the .NET managed wrapper of the DPAPI (Data Protection API)