【发布时间】:2022-01-01 22:10:09
【问题描述】:
我正在开发一个 Outlook 加载项应用程序,发现自己无法在本地运行它,尝试在“Office 桌面客户端”中运行它时出现以下消息:
“加载项错误,内容被阻止,因为它没有由有效的安全证书签名”
当我尝试使用 Chrome 或 Edge 运行插件时,我在插件中收到以下消息:
“加载项错误:出现问题,我们无法启动此加载项。请稍后重试或联系您的系统管理员。”
如果我尝试在 Chrome 或 Edge 上点击“重试”,我会收到以下加载项错误:
“此插件可能无法正常加载,但您仍可以尝试启动它。”
当我点击开始时,我得到以下信息:
“位于 https://localhost:44364/AddinClient?et=#/read 的网页可能暂时关闭,或者它可能已永久移动到新网址。”
当尝试在新标签页中通过 chrome 手动访问此地址时,它会设法在“此站点注意安全”警告之后加载到该标签页中
我注意到此问题的一些常见修复方法,例如在 Internet 选项中将 localhost 添加到受信任的站点并安装 office-addin-dev-certs,但是这些选项都没有解决问题(我也尝试过删除并重新- 安装我见过多次出现的证书)。
还有什么我可以尝试的吗?
有关我的设置的一些技术细节,我使用的是 Microsoft® Outlook® for Microsoft 365 MSO(版本 2110 Build 16.0.14527.20270)64 位。我使用的是 Windows 10 Pro,插件的清单文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:b1287d2e-c737-4a6d-84ad-8c25896b50dc-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
<Id>01fa9df4-6148-4299-b9f6-92898abce052</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Test</ProviderName>
<DefaultLocale>en-GB</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="Outlook Addin Dev" />
<Description DefaultValue="Outlook Addin Dev"/>
<IconUrl DefaultValue="~remoteAppUrl/AddinClient/assets/images/icon64.png"/>
<SupportUrl DefaultValue="http://www.MyTestSite.com" />
<!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
<AppDomains>
<AppDomain>https://localhost:44364</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.5" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="~remoteAppUrl/AddinClient"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="loadAddinGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Menu" id="loadAddinOpenPaneButton">
<Label resid="paneButtonLabel" />
<Supertip>
<Title resid="paneSuperTipTitle" />
<Description resid="paneSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="64" resid="icon64" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Items>
<Item id="mainCmd">
<Label resid="paneButtonLabel"/>
<Supertip>
<Title resid="paneButtonLabel"/>
<Description resid="paneSuperTipDescription"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="64" resid="icon64" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="loadAddinTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Item>
<Item id="signOutCmd">
<Label resid="paneSignOutLabel"/>
<Supertip>
<Title resid="paneSignOutLabel"/>
<Description resid="paneSignOutSuperTipDescription"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="cog16" />
<bt:Image size="32" resid="cog32" />
<bt:Image size="64" resid="cog64" />
<bt:Image size="80" resid="cog80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>signOut</FunctionName>
</Action>
</Item>
</Items>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabDefault">
<Group id="composeAddInGroup">
<Label resid="groupLabel" />
<Control xsi:type="Button" id="msgComposeFunctionButton">
<Label resid="paneAddCC"/>
<Supertip>
<Title resid="paneAddCC"/>
<Description resid="paneSuperTipDescription"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="64" resid="icon64" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="loadAddInComposePaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="~remoteAppUrl/AddinClient/assets/images/icon16.png"/>
<bt:Image id="icon32" DefaultValue="~remoteAppUrl/AddinClient/assets/images/icon32.png"/>
<bt:Image id="icon64" DefaultValue="~remoteAppUrl/AddinClient/assets/images/icon64.png"/>
<bt:Image id="icon80" DefaultValue="~remoteAppUrl/AddinClient/assets/images/icon80.png"/>
<bt:Image id="cog16" DefaultValue="~remoteAppUrl/AddinClient/assets/images/cog16.png"/>
<bt:Image id="cog32" DefaultValue="~remoteAppUrl/AddinClient/assets/images/cog32.png"/>
<bt:Image id="cog64" DefaultValue="~remoteAppUrl/AddinClient/assets/images/cog64.png"/>
<bt:Image id="cog80" DefaultValue="~remoteAppUrl/AddinClient/assets/images/cog80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
<bt:Url id="loadAddinTaskPaneUrl" DefaultValue="~remoteAppUrl/AddinClient#/read"/>
<bt:Url id="loadAddInComposePaneUrl" DefaultValue="~remoteAppUrl/AddinClient#/compose"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Add-In"/>
<bt:String id="customTabLabel" DefaultValue="Add-In"/>
<bt:String id="paneButtonLabel" DefaultValue="Add-In"/>
<bt:String id="paneSuperTipTitle" DefaultValue="Add-In"/>
<bt:String id="paneSignOutLabel" DefaultValue="Sign Out"/>
<bt:String id="paneAddCC" DefaultValue="Add-In"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneSuperTipDescription" DefaultValue="Opens the outlook addin."/>
<bt:String id="paneSignOutSuperTipDescription" DefaultValue="Sign Out of outlook addin"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
【问题讨论】:
标签: outlook-addin