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 am creating a model for a database and was curious at the following statement in the ADO.NET Entity Model wizard where you have the options of choosing Yes or No as where to store sensitive data -

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

I have never used this option and just wanted to find out if I did where I would have to specify my sensitive data. Any ideas?

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

Popular Answer

Set the connection string argument of the Model constructor:

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