When constructing an ADO.NET Model, how do you set your sensitive data in the application code?

c# connection entity-framework model security

Question

I was interested about the following sentence in the ADO.NET Entity Model wizard, which gives you the choice of selecting Yes or No as to where to store sensitive data, since I am building a model for a database:

"No, exclude sensitive data from the connection string. I will set it in my application code."

I was simply curious as to where I would need to provide my sensitive info because I haven't utilized this option before. Any thoughts?

1
14
9/11/2011 6:13:13 PM

Popular Answer

Configure the Model constructor's connection string parameter as follows:

MyEntities1 db = new MyEntities1 ("metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=';Data Source=localhost;Initial Catalog=myDb;User ID=user1;Password=myPass;MultipleActiveResultSets=True';"); 
8
9/12/2011 10:34:53 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow