.NET libraries to sanitize input?
问题 Are there any thoroughly tested .NET libraries out there to sanitize input from things like script/sql injection? 回答1: SQL injection and Cross-Site Scripting (a.k.a. XSS or Script Injection) are different problems. 1) SQL Injection is very easy, always use parametrized queries (SQLParameter) and try really hard to NEVER do sp_exec @query within T-SQL stored procedures. .Net parametrized queries will not protect against this second order injection. 2) XSS is more difficult to universally