I’ve just started creating my first MVC website; what’s the best practice to prevent hacking on my (site as cross site, SQL injection, etc.)?
I’m worried about uploading the site without security, I’ve encountered an actual injection before using cross site injection. How can I protect the site, can I encrypt the source asp page HTML design?
Use something like
Entity FrameworkorNHibarnateto prevent SQL injections. That are very powerfool tools for working with database.Other security questions you must solve as other frameworks too.For ASP. NET MVC I find some article here, take a look at this
For cross domain you can probably generate key for every request and store that in
Sessionand then check with that generated key.