I have build App in C# MVC and I'm using HTML5 Application cache manifest for run application even if internet unavailable. my code is as below.
Controller (Home):
public ActionResult Manifest()
{
Response.ContentType = "text/cache-manifest";
return View();
}
View (Manifest.cshtml)
CACHE MANIFEST
NETWORK:
*
CACHE:
~/Scripts/stylesheets/bootstrap.min.css
FALLBACK:
@{
Layout = null;
}
Layout.cshtml
<html manifest="/Home/Manifest">
But i am getting Error : Application Cache Error event: Failed to parse manifest
does i need to include view.cshtml files path in Cache in Manifest file?
I have tried some solution posted earlier in stackoverflow but not found any solution.
I have resolved this issue in visual studio for MVC application. follow below steps:
I have created .appcache file in notepad and copy manifest file content into it. (you don't need to create .Manifest file OR Manifest.cshtml view. just create .appcache file in notepad.)
give reference as <html manifest="~/example.appcache">
in view and issue will be resolved