Where we should give the Connection String whether in (Web .Config or .cs or seperate class file )?
which is more secure?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Francis SusaimichaelPosted Jun 15, 2016, 2:12 AM
Mostly the connection strings are kept in "Web.config" files.It providesa lot offlexibility and easy to maintain.
1.You can easily modify at any time.
Vinay SinghPosted Jun 15, 2016, 2:19 AM
ToString();
Retrieve Connection String From Web.config In ASP.net Using C#.Net (AppSettings,ConnectionStrings)
Surya KantPosted Jun 15, 2016, 1:31 AM
ali tuncerPosted Jun 15, 2016, 1:29 AM
If you are not encrypting the connecting string, I think it is better to leave it inside code, it is recommended to store it in config files, but you need to encrypt it first.
https://msdn.microsoft.com/en-us/library/dtkwfdky(v=vs.100).aspx
Ashiwani SharmaPosted Jun 15, 2016, 1:00 AM
Rajeesh MenothPosted Jun 15, 2016, 12:52 AM