WebResource.axd 突然停止在 ASP.Net 离线 Web 应用程序中工作

发布于 2024-11-30 13:49:26 字数 381 浏览 3 评论 0原文

在 VS2010 中构建离线 Web 应用程序。我有一个带有导航菜单控件的母版页。到目前为止,我已经能够添加 4 个新页面,每个页面都从此菜单控件导航到。所有内容均已添加到缓存清单文件中,并且到目前为止所有内容都已离线工作。将最新页面添加到项目后,现在当我离线时,我的菜单控件无法正确加载,控制台显示无法找到菜单控件的 webresource.axd,然后给出 sys is not定义的错误。仅当导航到页面时才会发生该错误,仅当单击导致 location.reload(true) 的按钮时才会发生该错误。

我从 VS 中看到,事情会正常工作,然后当你第二天早上重新启动 VS 时,事情会突然崩溃。但我的意思是这真的让我大吃一惊。

是否有另一种方法可以刷新离线页面,以便控件重置回原始值?这是我进行刷新的唯一原因。

Building an offline web app in VS2010. I have a master page with a navigation menu control. So far I've been able to add 4 new pages, each navigated to from this menu control. All has been added to the Cache Manifest file and all has worked offline up until now. After the most recent page was added to the project, now when I am offline, my menu control doesn't load properly and the console shows that the webresource.axd for the menu control couldn't be found and then gives the sys is not defined error. The error does not occur just by navigating to a page, only when button is clicked that causes a location.reload(true).

I've seen from VS where things will be working and then when you restart VS the next morning stuff will suddenly be broken. But I mean this is really blowing my mind.

Is there another way maybe to refresh an offline page such that the controls reset back to original value? That is the only reason I am doing the refresh.

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

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

发布评论

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

评论(1

帅的被狗咬 2024-12-07 13:49:26

就是这么简单的事情让我感到尴尬。我将 location.reload(true) 更改为 location.reload(false)。这样,它就不会尝试从服务器重新加载页面。全部固定。

It was something so simple I am embarrassed. I changed location.reload(true) to location.reload(false). That way, it wasn't trying to reload the page from the server. All fixed.

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