Apr 19, 2011 at 8:14 PM
Edited Apr 19, 2011 at 8:15 PM
I had a similar problem with attempting to use the precompiled versions of the AntiXssLibrary dlls; since there is zero documentation and no explanation, I simply assumed the following:
1) When working with code in a page or control and NOT in the .cs code-behind, I used the Import directive and assigned the Namespace to Microsoft.Security.Application.
2) I could then call the AntiXss object within my aspx, as in the following:
<asp:Label ID="lblFileSize" Text='<%# AntiXss.HtmlAttributeEncode(DataBinder.Eval(Container.DataItem, "ContentSize").ToString()) %>' runat="server" />
However, this use BROKE MY APPLICATION.
Therefore, I downloaded the solution code, believing that compiling the DLL into my solution would be far more elegant and sensible.
However, there appears to be entirely too much stuff in the solution code, including references to tools I don't and WON'T use (StyleCop?). Is there any way to pare down the solution to its bare essentials for those of us trying to use it in a real
environment? And perhaps some serious documentation on how to use it or how to compile it within another solution?