English 中文(简体)
微软网络保护 图书馆在ASP上贴有密码。 NET 4.0 Webforms gridview
原标题:Microsoft Web Protection Library doesn t encode XSS on ASP.NET 4.0 Webforms gridview

I ve got a ASP. NET 4.0 Webforms 表示使用一些电网。 I m试图让MS网络保护图书馆正确地将数据输入电网格中,以便保护它不受交叉现场描述问题的影响。

我通过NuGet增加了WPL图书馆的第4.2.1号,并在我的<编码>Web.config文档中增加了以下内容:

<httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary" executionTimeout="240" maxRequestLength="20480" requestValidationMode="2.0" />

不幸的是,这似乎行不通。 The string <b>hi There</b> isn t standardd whenproductted from a database to a gridview.

过去,我用一枚叫AntXsModule.dll的炮弹来这样做,但现在我可以发现任何提及这一点,而一切似乎都指向WPL。

我是否忽略了一些明显的东西?

问题回答

This reply may be one year too late, but here is what I found when having a similar problem: The combination of requestValidationMode = 2.0 and encoderType = AntiXssLibrary does not work, I had to change the value of requestValidationMode to 4.0. However, this may cause other problems.

/simon/





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签