Why you can do "SqlConnection con = new SqlConnection(cn.ConnectionString)" injection?
hi friends.
my english bad.... :p
in work friends say: in sqlconnection conn = new sqlconnection(); can sql injection. question is: true or not? why? , correcto form?
thanks answers.
chargoy
no. creating sqlconnection object cannot attacked sql injection. when pass parameterized query directly sqlcommand without using sqlparameters. below blog has explanation on it. http://www.codeproject.com/tips/492403/preventing-sql-injection-in-ado-net hope helps.
please mark post answer if solved problem. happy programming!
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment