URL重写创建AjaxToolkit兼容性问题 [英] URL Rewrites create compatibility issue with AjaxToolkit
问题描述
我使用的是最新的AjaxControlToolKit v15.1.3和使用...
ajaxtoolkit:calendarextender结果
块引用>有关弹出上点击日历工具。结果
一切工作足够细到那里。现在,当我添加URL重写code上的web.config文件,在弹出的点击不再发生。在code任何特定的编辑我需要更新这两个工作。搜索结果
这里是URL重写code:搜索<&改写GT;
<规则与GT;
<规则名称=RewriteASPX>
<匹配URL =(。*)/>
<条件logicalGrouping =MatchAll>
<添加输入={} REQUEST_FILENAME使用MatchType =ISFILE否定=TRUE/>
<添加输入={} REQUEST_FILENAME使用MatchType =IsDirectory否定=TRUE/>
&所述; /条件>
<作用TYPE =重写URL ={R:1}的.aspx/>
< /规则>
< /规则>
< /重写>
解决方案AjaxControlToolkit是众所周知的不与URL重写工作。这是因为,AjaxControlToolkit产生在运行时带个.axd扩展两个脚本文件:WebResource.axd的和的ScriptResource.axd。这两个文件的个.axd几参考被插入与字母数字和非字母数字字符的URL参数字符串的庞大客户端的HTML。当使用URL重写这些引用将会失败。就我而言,并在这个岗位概述,具体故障是403(禁止)错误。在该职位所提供的解决方案,为我工作,这是消除所有的URL重写。但愿这是一个选择了。
I'm using the latest AjaxControlToolKit v15.1.3 and using the ...
ajaxtoolkit:calendarextender
for popping up the calender tool on click.
everything works fine enough till there. now, when i add the URL rewrite code on the web.config file, the pop up on click no longer happens. any specific edit on the code i need to update for both to work.
Here is the URL rewrite code:<rewrite> <rules> <rule name="RewriteASPX"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="{R:1}.aspx" /> </rule> </rules> </rewrite>
解决方案AjaxControlToolkit is known to not work with URL rewrites. This is because the AjaxControlToolkit generates two script files with .axd extensions at runtime: WebResource.axd and ScriptResource.axd. Several references to those two .axd files get inserted in your client side HTML with huge strings of alphanumeric and non-alphanumeric characters as URL parameters. Those references will fail when URL rewrites are used. In my case, and as outlined in this post, the specific failure is a 403 (Forbidden) error. The solution provided in that post worked for me, which was to remove all URL rewrites. Hopefully that's an option for you too.
这篇关于URL重写创建AjaxToolkit兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!