How can I avoid SQL injection attacks in my ASP.NET application?

前端 未结 16 2066
死守一世寂寞
死守一世寂寞 2020-11-27 20:16

I need to avoid being vulnerable to SQL injection in my ASP.NET application. How might I accomplish this?

16条回答
  •  情歌与酒
    2020-11-27 20:36

    Use Prepared Statements (link to an ASP.NET tutorial that uses prepared statements in the 'To add nodes for products' section). that's all there is to it.

    Well, that or use an ORM, like Linq to SQL or NHibernate, they internally use prepared statements.

提交回复
热议问题