简体   繁体   English

使用HTML5缓存清单缓存.aspx页时出现404错误

[英]404 Error When Caching .aspx Pages With HTML5 Cache Manifest

Has anyone been able to cache .aspx pages using the HTML cache manifest? 有没有人能够使用HTML缓存清单来缓存.aspx页? I am porting an html application over to asp.net (and mvc2) and I get a 404 error when trying to cache any *.aspx page. 我将html应用程序移植到asp.net(和mvc2),尝试缓存任何* .aspx页时收到404错误。 Other files still cache normally (.js, .css, etc). 其他文件仍会正常缓存(.js,.css等)。 I have changed permissions, handlers, and file names and still no luck. 我更改了权限,处理程序和文件名,但还是没有运气。 Below is the actual manifest: 以下是实际的清单:

CACHE MANIFEST
# This file was generated at 2/28/2011 4:03 PM
CACHE:
/Content/Site.css
/Content/Table_style.css
/Scripts/jquery-1.5.min.js
/Scripts/json.js
/Scripts/persist-all.js
/Views/Data/Details.aspx
/Views/Data/NotFound.aspx
/Views/Data/OffLine.aspx
/Views/Data/OnLine.aspx
/Views/Data/Test.aspx
/Views/Home/About.aspx
/Views/Home/Index.aspx
/Views/Shared/Error.aspx

Every request goes through a controller, not directly to the view. 每个请求都通过一个控制器,而不是直接到达视图。 Look at the url's in your browser, it never ends with .aspx (when using MVC). 查看浏览器中的URL,它永远不会以.aspx结尾(使用MVC时)。

It looks like you have a Data and a Home controller. 看起来您有一个Data和一个Home控制器。 Your urls will probably be something like: 您的网址可能类似于:

  • /Data/Details /数据/详细信息
  • /Data/NotFound /数据/未找到
  • /Data/OffLine /数据/离线
  • /Data/OnLine /数据/在线
  • /Data/Test /数据/测试
  • /About /关于
  • / /

These are the url's you need in your cache manifest. 这些是您在缓存清单中所需的url。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM