0

Using the database first approach and the app config that stores the entire connection string, what is the best practices approach to handling an encrypted password or an entire encrypted connection string? I've read in other places about creating another constructor for the context that passes in a connection string but wanted to see if there was a better way. I want to avoid having to micro manage model classes in this way and looking for something more streamline

6
  • See stackoverflow.com/questions/8760048/… Commented Dec 12, 2016 at 18:31
  • Steve, that solution proposes to make changes to the model class. as soon as the model is updated from the database, it overwrites changes made to those classes. As my question stated, i'm looking to avoid having to micro manage model classes, especially ones that warn you that manually modifying them will be overwritten on code regeneration. Commented Dec 12, 2016 at 19:05
  • Send the password un-encryted as POST data usiong a HTTPS connection. Commented Dec 12, 2016 at 19:34
  • It's a windows application Commented Dec 12, 2016 at 20:04
  • 1
    What models are you referring to? Lots of ways to handle securing a connection string and passing it into the EF context. Why not just store an encrypted password in your app.config and replace it in code (ConnectionStringBuilder) before passing it to the context? msdn.microsoft.com/en-us/library/cc716760(v=vs.110).aspx Commented Dec 12, 2016 at 20:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.