无法安装自己的谷歌浏览器扩展程序

时间:2013-01-29 00:28:49

标签: asp.net google-chrome-extension


我想在我的asp.net服务器上托管我自己的扩展(它是免费的Web服务器,所以我没有访问machine.config等)。
但问题的关键在于此。我把打包的扩展名放到服务器上,我想要使用这样的东西:

protected void Page_Load(object sender, EventArgs e)
    {
        string file = Request.QueryString["f"];
        if (file != null)
        {            
            Response.Write("");
            if (file == "0")
            {
                Response.ContentType = "application/x-chrome-extension";
                Response.AddHeader("Content-Disposition", "attachment;filename=RemotePlay_extension.crx");
                Response.TransmitFile("~/Extensions/Update/RemotePlay_extension.crx");
            }
            else
            {
                Response.ContentType = "application/x-chrome-extension";
                Response.AddHeader("Content-Disposition", "attachment;filename=RemotePlay_extension.crx");
                Response.TransmitFile("~/Extensions/RemotePlay_extension.crx");
            }
        }
    }

但每次我收到此错误:
Error i get after download the extension: Package is invalid: 'CRX_SIGNATURE_VERIFICATION_FAILED'


扩展来源清单:

{
 "name": "Remote Play",
 "description": "DJ interface to use RP.",
 "version": "0.0.0.2",
 "update_url": "../Extensions/RemoteChrome_Update.xml",
 "permissions": ["tabs", "http://*/*"],
 "background": { "scripts": ["background.js"] },
 "content_scripts": [{"matches": ["http://*/*"],"js": ["inject.js"]}],
 "page_action": {"default_icon": "playico.png", "default_popup": "popup.html"},
 "manifest_version": 2
}

我做错了什么?那个错误在哪里?

1 个答案:

答案 0 :(得分:1)

您无法通过Page_Load功能和标题

触发安装
  • 您应该有一个链接标记<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/apdfllckaahabafndbhieahigkjlhalf">
  • 您可以通过chrome.webstore.install(url, successCallback, failureCallback)
  • 触发安装

有关详细信息,请查看documentation