.NET libraries to sanitize input?

TWA picture TWA · Jun 2, 2009 · Viewed 17.1k times · Source

Are there any thoroughly tested .NET libraries out there to sanitize input from things like script/sql injection?

Answer

Tim Scarborough picture Tim Scarborough · Jun 2, 2009

I like to use the Microsoft AntiXSS library. It's free and pretty easy to use.

For SQL injection, I always use parameters. Again, they are easy to use and I don't like trying to escape special characters. It's a recipe for disaster if you ask me.