Webresource.axd 无法加载到我的网络场中运行的 ASP.NET 应用程序上

发布于 2024-09-26 05:25:35 字数 865 浏览 0 评论 0原文

我正在开发 ASP.net Web 应用程序。我在某些页面上遇到运行时 JavaScript 错误。

我已将问题范围缩小到母版页上的单个 ASP 菜单控件。我仅使用 ASP 菜单控件创建了一个空白页。 ASP 菜单控件绑定到 Web.sitemap。该页面间歇性地给出运行时错误。

但是,如果我刷新页面,则错误可能会也可能不会出现在任何给定的页面加载上。有时,它有效;有时,它有效。有时,当加载页面或将鼠标悬停在 ASP 菜单控件上时,浏览器会抛出运行时错误。

当我在 Visual Studio 中捕获错误时,消息为“microsoft jscript 运行时错误 'sys' 未定义”。当我 Google 搜索此消息时,我发现它通常与 AJAX 相关。然而,页面上唯一的东西是一个 ASP 控件。

除了 .net 框架生成的内容之外,页面上绝对没有 Javascript。

什么可能导致这个问题?

更新 我发现我的环境实际上具有与为 URL 提供服务的三台服务器组成的网络场的负载平衡。当我通过 IP 地址单独访问任何一台服务器上的应用程序时,一切正常。

澄清一下,我知道当用户点击面向公众的 URL 时,它会解析为 xxx1。 xxx1 是将请求路由到 xxx2、xxx3 或 xxx4 的交换机的地址。

当我使用面向公众的 URL 时,我发现一些 axd 文件请求间歇性地重新路由到 Error.aspx! WTF!?!?!?!?!?

我被告知这是安全功能的结果,该功能旨在保护我免受跨站点脚本和其他各种不良内容的侵害。我能做些什么?

更新 删除一些错误页面自动重定向后,我收到一条更有意义的错误消息:ASP.NET Ajax 客户端框架无法加载。

I'm working on an ASP.net web application. I'm getting errors on some of my pages where I get runtime JavaScript errors.

I've narrowed the problem down to a single ASP Menu control on the master page. I created a blank page with just the ASP Menu control. The ASP Menu control is bound to Web.sitemap. The page intermittently gives runtime errors.

However, if I refresh the page, the error may or may not appear on any given page load. Sometimes, it works; sometimes, the browser throws runtime errors when loading the page or when I mouse over the ASP Menu control.

When I catch the error in Visual Studio, the message is "microsoft jscript runtime error 'sys' is undefined". When I Google for this message, I find that it is usually associated with AJAX. However, the ONLY thing on the page is a single ASP control.

There is absolutely no Javascript on the page except for what gets generated by the .net framework.

What could be causing this problem?

UPDATE I've found out that my environment actually has load balancing with a web farm of three servers servicing the URL. When I access the application on any one of the servers individually by IP address, everything works fine.

To clarify, I understand that when a user hits the public-facing URL, it resolves to x.x.x.1. x.x.x.1 is the address for a switch which routes the request to either x.x.x.2, x.x.x.3, or x.x.x.4.

When I use the public-facing URL, I find that some of the axd file requests are intermittently rerouted to Error.aspx! WTF!?!?!?!?!?

I'm told that this is the result of a security feature that is meant to protect me from cross-site scripting and other assorted bad stuff. What can I do?

Update After taking out some error page auto-redirects, I get a more meaningful error message: ASP.NET Ajax client-side framework failed to load.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江南月 2024-10-03 05:25:35
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文