1

我的 ScriptResources.axd 调用加载了错误的(旧)javascript 版本。看起来它从 AjaxControlToolkit 而不是较新的 MS 版本中获得了一些东西。
我在哪里可以改变这个?或者我怎样才能弄清楚发生了什么?

根据下面的答案,我检查了我的配置:

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>

这对我来说看起来不错。但是,ScriptResources.axd 仍然返回:

// (c) 2010 CodePlex Foundation
(function(n,t){function w(){function

此外,如果我切换到EnableCdn="True"ScriptManager,它适用于 WebResource.axd,然后从 CDN 获取文件,但 ScriptResources.axd 没有被替换,仍然使用旧的 codeplex 文件。

作为旁注:这一切都可以在我同事的电脑上运行,但还没有找到区别。

4

1 回答 1

0

The resources used to generate the content output (JS) are compiled within the application (this is a the "build action : Embedded Resource" in files properties). If the content loaded is the AjaxControlToolkit, then you should have a look at your ScriptManager configuration (it is probably the AjaxControlToolkit's script manager).

Additionnal note: the handler is usually defined by the following section in the Web.config file (although Telerik might use a custom handler for their files such as themes / javascript):

<httpHandlers>
  <add verb="GET,HEAD" path="ScriptResource.axd" 
    type="System.Web.Handlers.ScriptResourceHandler, 
    System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 
    PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
于 2013-10-08T08:21:06.700 回答