【问题标题】:ASP.NET 4.5 Ajax works fine on local but Ajax client-side framework failed to load when hosted in a web serverASP.NET 4.5 Ajax 在本地运行良好,但托管在 Web 服务器中时无法加载 Ajax 客户端框架
【发布时间】:2013-10-03 09:51:55
【问题描述】:

我在我的网站中使用 ScriptManager 和 UpdatePanel,当它是从 Visual Studio 2012 调试时,所有东西都在本地机器上运行,但是当它托管在 Web 服务器中时,它给出了几个错误:

未捕获的错误:无法加载 ASP.NET Ajax 客户端框架。 未捕获的引用错误:未定义 Sys

而且它没有加载 scriptresources.axd 文件,因为它说 500 Internal Server Error

【问题讨论】:

  • 嗯,这是一个非常通用且臭名昭著的错误^^。您是否启用了 URL 重写?另外,试试this
  • 非常感谢帮助很大
  • 不要犹豫,发布您问题的答案,这将帮助其他面临同样问题的人。
  • 感谢提醒

标签: asp.net ajax vb.net iis web-config


【解决方案1】:

我已将 web.config 文件更改为如下文件

<modules>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule" />
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <remove name="ScriptHandlerFactory"/>
        <remove name="ScriptHandlerFactoryAppServices"/>
        <remove name="ScriptResource"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v13.1, Version=13.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" verb="GET" path="DX.ashx" name="ASPxHttpHandlerModule" preCondition="integratedMode" />
    </handlers>
  </system.webServer>

【讨论】:

    猜你喜欢
    • 2011-04-11
    • 2011-04-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    • 2020-10-18
    相关资源
    最近更新 更多