In this previous article you had read about XSS attack. Now i am to explain an Anti XSS library from Microsoft to prevent XSS attack.
Anti XSS Library
Someone come to a form and enter some script like below
It’s also more malicious. Fortunately Microsoft provide a library for prevent this. You can download it via nugget or Library Package Manager Console (Visual Studio>>Tools>>Library Package Manager>>Package Manager Console and type Install-Package AntiXSS and press enter).
What I am going to do I am putting a line of code in the below Edit action post method
And this code will remove all the malicious things
Hope you are enjoying my article…