Firefox OS App Manifest抛出NS_ERROR_FAILURE错误

时间:2013-07-25 13:56:39

标签: web-applications mime-types firefox-os

我正在构建一个Firefox OS应用程序,并在以下代码行中:

var app = navigator.mozApps.install('mymanifest.webapp');

Firefox控制台抛出错误:

Error: NS_ERROR_FAILURE: INVALID_URL: '/mymanifest.webapp', Source File: resource://gre/components/Webapps.js, Line: 87

我的MVC控制器就是这样:

public ContentResult FirefoxOsManifest()
{
    string json = GetManifestJson(); // a method that returns json string

    return Content(json, "application/x-web-app-manifest+json");
}

我已将.webapp mimetype添加到我的IIS,重新启动IIS,重新启动World Wide Web Publishing Service,重新启动浏览器,验证清单,仍然收到错误。我错过了什么?

1 个答案:

答案 0 :(得分:1)

Mozilla的某个人就此回复了我。

We currently do not support installation of web apps through a relative URL. You need to use an absolute URL path to the webapp manifest.