404 Error When Caching .aspx Pages With HTML5 Cache Manifest
Has anyone been able to cache .aspx pages using the HTML cache manifest? 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. Other files still cache normally (.js, .css, etc). 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).
It looks like you have a Data and a Home controller. 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.
精彩评论