【问题标题】:ScriptResource.axd is not loading in asp.net ? 500 URL Rewrite Module ErrorScriptResource.axd 没有加载到 asp.net 中? 500 URL 重写模块错误
【发布时间】:2014-01-03 23:22:44
【问题描述】:

我在 ektron V8.0 SP1 上构建了 asp.net 网站。我在我的应用程序中使用 url 重写模块。它按预期工作。我的应用程序中也有 telrick 控件。

但不幸的是,现在我的网页中无法使用任何 telrick 控件。原因是:

 corresponding ScriptResource.axd resource are not loading as expected.

我的网络浏览器出现此错误。

当我在<outboundRules> 中评论很少<rule.../>时它开始工作。

一旦我从托管服务器浏览错误是

HTTP Error 500.52 - URL Rewrite Module Error.
Outbound rewrite rules cannot be applied when the 
content of the HTTP response is encoded ("gzip").

任何人都知道为什么脚本资源没有加载。 欢迎提出任何想法。

【问题讨论】:

    标签: c# asp.net url-rewriting web-config telerik


    【解决方案1】:

    您可能需要添加一条规则来忽略 *.axd 作为您的首要规则之一:

    <rule name="Exclude some stuff" stopProcessing="true">
      <match url="(.*)\.(asmx|svc|axd)(.*)$" />
      <action type="Rewrite" url="{R:1}.{R:2}{R:3}" />
    </rule>
    

    【讨论】:

    • 我试过这个,但问题仍然存在。
    • 您能否直接在浏览器中查看调用 axd URL 的事件查看器以获取更详细的错误消息?
    • 是否可以禁用压缩?如此处建议:stackoverflow.com/questions/3713804/…
    • 我的 web.config 中已经有 &lt;urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" /&gt;
    • Telerik 组件是否有自己的设置和自己的启用压缩标志?假设正在加载的 ScriptResources 用于 Telerik。我对组件不熟悉,所以不知道设置。
    【解决方案2】:

    我遇到了同样的问题,对我有用的是添加一个新的前提条件,确保不检查 .AXD,并将前提条件添加到导致问题的出站规则:

    <outboundRules>
       <rule name="ProblemRule" preCondition="noAxd" enabled="true">
          ...
       </rule>
       <preConditions>
           <preCondition name="noAxd">
                <add input="{URL}" pattern="\.axd$" negate="true" />
           </preCondition>
       </preConditions>
     </outboundRules>
    

    【讨论】:

      【解决方案3】:

      您能否详细说明一下您在页面上使用的 ScriptManager 究竟是什么?是RadScriptManager还是asp ScriptManager?

      如果您使用的是 RadScriptManager,您可以仔细检查如果您用 asp 替换它(“ScriptManager”)是否会复制问题。在这种情况下,问题页面的 HTTP 流量将更加密集和具有描述性

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-11-27
        • 2018-05-04
        • 2017-01-18
        • 2011-01-14
        • 2012-06-13
        • 1970-01-01
        • 2014-09-11
        • 2012-12-22
        相关资源
        最近更新 更多