Microsoft Anti-Cross Site Scripting Library

While developing the web site using knowingly or unknowingly we get different kinds of security alerts. In that one security alert is "Cross Site Scripting" we can prevent this alert while developing the website in Visual Studio 2005 or Visual Studio 2010. To prevent "Corss Site Scripting" use "Microsoft Anti-Cross Site Scripting Library" this library is redistributable can download from Microsoft site for Visaual Studio 2005 and Visaual Studio 2010. Once download this redistirbutable from the microsoft site and install on our machine. After we have done installation we can add the .dll as reference to our solution.

Once we addeded reference then use namespace "Microsoft.Security.Application",
we get different methods from the class "AntiXss" like

1) AntiXss.Equals
2) AntiXss.HtmlAttributeEncode;
3) AntiXss.HtmlEncode
4) AntiXss.JavaScriptEncode
5) AntiXss.ReferenceEquals
6) AntiXss.UrlEncode
7) AntiXss.VisualBasicScriptEncode
8) AntiXss.XmlAttributeEncode
9) AntiXss.XmlEncode

Using above methods we can endoce inputs to prevent Cross Site Scripting.

1) To download "Microsoft Anti-Cross Site Scripting Library V1.0" from following url:

2) To download "Microsoft Anti-Cross Site Scripting Library V1.5" from following url:

1) To download "Microsoft Anti-Cross Site Scripting Library V3.1" from following url:



No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: