2012-04-05 84 views
0

我得到404未找到我缩小的javascript文件的状态码,也有一个错误ASP.Net ajax客户端框架未能加载。404找不到asp.net网站

我已经给下面的web.config中我的配置设置,

<httpModules> 
     <!-- Component Art--> 
     <add type="ComponentArt.Web.UI.UploadModule,ComponentArt.Web.UI" name="ComponentArtUploadModule"/> 
     <!--Blog Engine--> 
     <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/> 
     <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/> 
     <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/> 
     <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/> 
     <!--Remove the default ASP.NET modules we don't need--> 
     <remove name="PassportAuthentication"/> 
     <remove name="Profile"/> 
     <remove name="AnonymousIdentification"/> 
    </httpModules> 
<system.webServer> 
     <validation validateIntegratedModeConfiguration="false"/> 

     <modules> 
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/> 
     </modules> 
     <handlers> 
      <add name="ComponentArtScriptHandler" type="ComponentArt.Web.UI.ScriptHandler,ComponentArt.Web.UI" path="ComponentArtScript.axd" verb="*" /> 
     </handlers> 
    </system.webServer> 

我无法弄清楚我是否缺少任何配置或增加额外的东西。有人可以看一下

+0

请求脚本资源的Url是否有效?可能是它不能解决你想要的路径。 – Ramesh 2012-04-05 08:46:54

回答

0

如果你得到“找不到”的错误,解决路径有问题。路径/文件不存在(因为它在别的地方),或者在重写/路由引擎中有一些冲突的规则。

尝试使用,作为一个临时的解决办法,绝对路径。这意味着不是

href="../../my.js" 

你会写

href="http://mypage.com/js/my.js" 
0

类似@walther

href="/js/my.js" 

作为第一斜线将采取路径URL的根,所以有用用于在不同环境之间移动时(只要您的开发者不在子文件夹中)。