SQL Injection in .NET

后端 未结 5 1561
自闭症患者
自闭症患者 2021-01-23 17:01

Hi I was wondering if anyone knew of some good websites detailing prevention for SQL injection for .NET web applications. Any resources would be greatly appricated, thank you.

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-23 18:04

    • golden rule: never concatenate user input
    • if you write your own command strings in .NET, use the Parameters collection
    • if you use LINQ, it will usually do it for you
    • if you write commands in TSQL, use sp_executesql or your vendor's equivalent

提交回复
热议问题