0

我今晚使用 Infragistics Web 控件为客户推送了一个网站,但我们遇到了一个问题,即相关 AXD 文件的路径包含双连字符。这会导致客户端的防火墙程序阻止对文件的访问,因为它将双连字符视为 SQL 注入攻击。

谁能提供一些关于如何进行的想法?

谢谢。

4

1 回答 1

0

对于可能遇到此问题的其他人:所以我最终做的是修改 Infragistics ScriptManager 的配置,默认将脚本组合成一个大脚本文件,如下所示:

<ig:WebScriptManager runat="server" ID="igScriptManager" CompositeScript-ScriptMode="Release" CompositeScript-Path="InfragisticsCombined.js">
<CompositeScript>
<Scripts>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.0_igControlMain.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.2_igCollections.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.3_igUIBehaviors.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.4_igEnums.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.5_igObjects.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.7_igClientStateManager.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.8_igCallback.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.9_igPropertyManagers.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.1_igControlMainClientBinding.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.Scripts.6_igObjectsClientBinding.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.SharedScripts.igAnimation.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.EditorControls.WebTextEditor.js.igTextEditor.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.EditorControls.WebMonthCalendar.js.igCalendar.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebDataGrid.js.igWebDataGridBase.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebDataGrid.js.igWebDataGrid.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebDataGrid.js.igWebDataGridPaging.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebDataGrid.js.igWebDataGridSorting.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.SharedScripts.igDragDrop.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid.js.igWebHierarchicalDataGrid.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.SharedScripts.igLayoutPane.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.LayoutControls.WebTab.js.igTab.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.GridControls.WebDataGrid.js.igWebDataGridSummaryRow.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Infragistics.Web.UI.SharedScripts.igDropDown.js" assembly="Infragistics4.Web.v12.1, Version=12.1.20121.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"/>
<asp:ScriptReference name="Common.Common.js" assembly="AjaxControlToolkit, Version=4.1.51116.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="ExtenderBase.BaseScripts.js" assembly="AjaxControlToolkit, Version=4.1.51116.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="PasswordStrength.PasswordStrengthExtenderBehavior.js" assembly="AjaxControlToolkit, Version=4.1.51116.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
</Scripts>
</CompositeScript>
</ig:WebScriptManager>

ScriptReference 标记告诉 ScriptManager 哪些脚本包含在组合文件中。CompositeScript-Path 参数给它一个一致的名称,以便明确避免“危险”字符。

在http://community.infragistics.com/aspnet/articles/understanding-script-combining.aspx中可以找到关于如何找出要包含在列表中的 javascript 文件名的好文章。

另外,我没有尝试过,但我在研究这个问题时得到的印象是,在 ASP.NET 3.5 之后,AjaxToolkit ScriptManager 也可以使用类似的过程。

于 2012-07-24T19:12:40.297 回答