4

Can I include Microsoft's Anti-XSS library in my ASP.Net 2.0 application without Visual Studio? If so, how?

I've already downloaded and installed the library. From Microsoft's download page: "Reference the library in your application and use it." Researching this turns up instructions for doing so with Visual Studio, but not without.

This S.O. answer links to a few promising articles, but those also assume Visual Studio to start.

(As for why I can't use Visual Studio: my manager says "No.")

Community
  • 1
  • 1
LisaEB
  • 153
  • 1
  • 7
  • So what environment are you using to dev in? Where it says "Reference the library in your application" you can read this as add it to your project, make sure it's deployed with the project and call the methods it contains. – blowdart Feb 08 '12 at 01:18
  • @blowdart Apologies, I didn't realize there were other options. I'm using a text editor. – LisaEB Feb 08 '12 at 18:11

1 Answers1

6

Its very simple, just copy the file \program Files\Microsoft Corporation\Anti-Cross Site Scripting Library V1.5\Library\Net 2.0\AntiXssLibrary.dll, into your /bin/ directory of your asp.net and you ready to use it by just include the reference of antixss in every code that you won to use it.

The library is this file: AntiXssLibrary.dll

If not found on the directory I write for, just search your disk, where you have install it.

Ver 4.2.1

For the version 4.2.1 that you have a link on it the files are on

c:\Program Files\Microsoft Information Security\AntiXSS Library v4.2\NET20\

and you copy both, AntiXssLibrary.dll and AntiXssLibrary.xml to your /Bin/ directory of your asp.net

Download

If you can not find the library installed on your computer from the visual studio or from the SDK, you can always download it from Microsoft. The latest version is here:

https://www.microsoft.com/en-us/download/details.aspx?id=43126

Aristos
  • 66,005
  • 16
  • 114
  • 150
  • Thank you! This got me to where I needed. I had some trouble figuring out how to reference the library once the .dll was in the /bin directory. Initially I tried importing the namespace, but in a .asp file instead of a .aspx file. Changing it to .aspx, <%@ Import Namespace="Microsoft.Security.Application" %> did the trick, which in retrospect makes sense. (I'm happily muddling through. :) ) – LisaEB Feb 08 '12 at 18:06
  • Note you don't have to copy the XML file, it's just there for intellisense :) – blowdart Feb 08 '12 at 20:41
  • @blowdart Copy it, it may help you and in case of error exception, you get detaild throw data. – Aristos Feb 08 '12 at 20:44
  • Anti-Cross Site Scripting Library V1.5 is not a default folder and we need to download the library from https://www.microsoft.com/en-us/download/confirmation.aspx?id=28589 – Rama Krshna Ila Oct 10 '17 at 18:57
  • 1
    @RamaKrshnaIla thank you for the note, its an 8 years old answer - I don't remember why I have it on my computer at that time, I will update the answer with a link - aaa, now I see the question- on the question the user all ready install it on their computer... so that's the why didn't mention the download... so consider again about the -1 – Aristos Oct 11 '17 at 14:33