ASP.NET Ajax 客户端框架加载失败
我收到这个错误:
ASP.NET Ajax 客户端框架加载失败
并出现错误:
“Sys”未定义。
错误 qppears 在 IE 底部(错误消息),并且仅当我在服务器上运行该站点时才出现。在我的本地主机上一切正常。
我搬到了新服务器,但我遇到了问题。在我以前的服务器中一切都很好。
问题来自于ajax的SCRIPTMANAGER。
我能做什么? web.config 中的某些内容,或者主机公司是否需要安装某些内容?
ASP.NET 4、IIS 7.5
IE 上丑陋的黄色三角形并不是让我不安的原因。最大的问题是带有更新面板的脚本管理器 - 不起作用!
I got this error:
ASP.NET Ajax client-side framework failed to load
with the error:
'Sys' is undefined.
The error qppears in IE on the bottom (error message), and appears only when i'm running the site on server. on my localhost everything works fine.
i moved for new server, and there i have the problem. in my previous server everything was fine.
The problem comes from the SCRIPTMANAGER of the ajax.
what i can to do? somthing in the web.config, or should the host company need to install somthing?
ASP.NET 4, IIS 7.5
The ugly yellow triangle on the IE is not what is disturbing me.. the big problem is that the script manager with the update pannel - dont work !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
一个快速的解决方案是更新您的 web.config 并添加以下部分
A quick solution is to update your web.config and add following section
我也遇到过同样的问题,罪魁祸首是来自其他应用程序的 web.config 文件,该文件保存在网络根目录中。 (有人已在 Web 根目录上安装了该应用程序)
一旦将其移动到文件夹中,问题就消失了。
I had faced the same issue and the culprit was a web.config file from some other app, that was kept on the web root. (Someone had installed the app on web root)
Once it was moved inside a folder, the problem disappeared.
我遇到了同样的错误,经过一番苦思冥想,我发现我创建的自定义 HttpModule 正在拦截所有 Http 请求,并且不仅限于 .aspx 仅请求。
我的模块评估了一些标准,并在必要时重定向到 404 或 500 页面。问题是它对所有请求都执行此操作,包括对 .axd 资源(例如 ScriptManager.axd)的请求。通过过滤模块中的 .aspx 文件,一切都神奇地再次开始工作。
有时候,问题出在你眼皮子底下的事情。我希望这可以帮助一些可怜的鞋底,并节省他们花费我的时间和精力。
干杯,
凯恩
I had the same error and, after a lot of head-scratching, I discovered that the custom HttpModule that I had created was intercepting all Http Requests and wasn't limited to .aspx requests only.
My module evaluated some criteria and redirected to a 404 or 500 page where necessary. The problem was that it was doing this for all requests including the requests for .axd resources such as the ScriptManager.axd. By filtering for .aspx files in the module, it all magically began to work again.
Sometimes it's the things right under your nose that are the problem. I hope that this helps some poor sole and saves them the time and effort it took me.
Cheers,
Kaine
仅供参考,经过两天的查找,终于找到了原因。它与这里所说的其他完全不同。
有效原因是“Web.config”文件中的错误条目。正是这一行:
整个网站工作正常,除了 ASP.NET Ajax 内容没有加载。
使用 Firefox 和 Web 开发人员控制台中的网络日志,我看到一些 .AXD 文件有大量相同的 302 HTTP 重定向。即存在一个无限循环,浏览器最终在大约之后终止了该循环。 20-30 次重定向。
上面的行导致了这些重定向。
我的假设是这种行为:
解决方案是删除(不必要的)重定向。在此之后,一切又恢复正常了。
(我们通过安装 IIS URL 重写模块)
Just for reference purposes, after hunting down this error for two days, we finally found the reason. It was completely different than the other ones stated here.
The effective reason was an erroneous entry in the "Web.config" file. It was this line:
The whole website worked correctly, except that the ASP.NET Ajax stuff did not load.
Using Firefox and the network log in the web developer console, I saw a huge amount of the same 302 HTTP redirects of some .AXD files. I.e. there was an endless loop which the browser finally killed after approx. 20-30 redirects.
The above line caused these redirects.
My assumption is this behavior:
The solution was to remove the (unnecessary) redirect. After this, everything worked fine, again.
(We did the actual redirects we needed then by installing the IIS URL Rewrite module)
过去两天我也遇到了同样的错误。最后我解决了这个问题。
在 IIS 的托管处理程序中添加以下项目。
脚本处理工厂
I had the same error for past two days. finally i resolve the issue.
add the following items in Managed Handler in IIS.
ScriptHandlerFactory
事实证明,我的解决方案是从应用程序站点中删除 URL 重写!我们的网站大部分是WordPress静态页面,需要重写;当我们将应用程序转换为站点时,IIS 自动应用重写。
Turns out the solution for me was to remove URL rewrites from the application's site! Most of our site is WordPress static pages, which needed the rewrites; when we converted the application to a site, IIS automatically applied the rewrites.