如何在添加 Outlook 的任务窗格中加载使用子域 (https://example.example.net) 托管的网页?

How to load a web page hosted using a subdomain (https://example.example.net) inside the task pane in a outlook adding?

我正在尝试在 Office Outlook 加载项中加载外部网页。当我在 manifest.xml.

的桌面设置部分使用没有子域 (https://example.net) 的 URL 时,它在任务窗格中正确加载

这个很好用

       <SourceLocation DefaultValue="https://example.net/?mobileapp=true/#/outlook"/>
       <RequestedHeight>250</RequestedHeight>
 </DesktopSettings>

我已经更改了文档中提到的标签以匹配子域,如下所示。但没有运气。新的 url 正在单独的浏览器中加载 window

<AppDomains>
    <AppDomain>https://example.domain.net</AppDomain>
    <AppDomain>https://example.net</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://example.domain.net/?mobileapp=true/#/outlook"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>

下面给出了完整的 manifest.xml 谁能告诉我这里缺少了什么。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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" xsi:type="MailApp">
  <Id>55541d9d-dc69-4aa3-8015-35f93ad19b83</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>ExampleWebsitename</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="ExampleWebsitename"/>
  <Description DefaultValue="New Creates tasks from emails"/>
  <IconUrl DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-80.png"/>
  <SupportUrl DefaultValue="https://www.ExampleWebsitename.com"/>
  <AppDomains>
    <!-- <AppDomain>https://release.ExampleWebsitename.net</AppDomain> -->
    <AppDomain>https://ExampleWebsitename.net</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://release.ExampleWebsitename.net/?mobileapp=true/#/outlook"/>
        <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">
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="Commands.Url"/>
          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="msgReadGroup">

                <Label resid="GroupLabel"/>
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <Label resid="TaskpaneButton.Label"/>
                  <Supertip>
                    <Title resid="TaskpaneButton.Label"/>
                    <Description resid="TaskpaneButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="ExampleWebsitename-logo.16x16"/>
                    <bt:Image size="32" resid="ExampleWebsitename-logo.32x32"/>
                    <bt:Image size="80" resid="ExampleWebsitename-logo.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>

              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="ExampleWebsitename-logo.16x16" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-16.png"/>
        <bt:Image id="ExampleWebsitename-logo.32x32" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-32.png"/>
        <bt:Image id="ExampleWebsitename-logo.80x80" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://release.ExampleWebsitename.net/?mobileapp=true/#/outlook"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="ExampleWebsitename Add-in"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="Mobile View Create Task"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
      </bt:LongStrings>
    </Resources>

    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.3">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">

          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadGroup">

                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="msgReadOpenPaneButton">
                    <Label resid="TaskpaneButton.Label"/>
                    <Supertip>
                      <Title resid="TaskpaneButton.Label"/>
                      <Description resid="TaskpaneButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="ExampleWebsitename-logo.16x16"/>
                      <bt:Image size="32" resid="ExampleWebsitename-logo.32x32"/>
                      <bt:Image size="80" resid="ExampleWebsitename-logo.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                    </Action>
                  </Control>

                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>

          <MobileFormFactor>
            <FunctionFile resid="Commands.Url" />

            <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
              <Group id="mobileMsgRead">
                <Label resid="GroupLabel" />
                <Control xsi:type="MobileButton" id="mblTaskPaneBtn">
                  <Label resid="TaskpaneButton.Label" />
                  <Icon xsi:type="bt:MobileIconList">
                    <bt:Image size="25" scale="1" resid="ExampleWebsitename-logo.25x25" />
                    <bt:Image size="25" scale="2" resid="ExampleWebsitename-logo.25x25" />
                    <bt:Image size="25" scale="3" resid="ExampleWebsitename-logo.25x25" />

                    <bt:Image size="32" scale="1" resid="ExampleWebsitename-logo.32x32" />
                    <bt:Image size="32" scale="2" resid="ExampleWebsitename-logo.32x32" />
                    <bt:Image size="32" scale="3" resid="ExampleWebsitename-logo.32x32" />

                    <bt:Image size="48" scale="1" resid="ExampleWebsitename-logo.48x48" />
                    <bt:Image size="48" scale="2" resid="ExampleWebsitename-logo.48x48" />
                    <bt:Image size="48" scale="3" resid="ExampleWebsitename-logo.48x48" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="Taskpane.Url" />
                  </Action>
                </Control>

              </Group>
            </ExtensionPoint>
          </MobileFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="ExampleWebsitename-logo.16x16" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-16.png"/>
          <bt:Image id="ExampleWebsitename-logo.25x25" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-25.png"/>
          <bt:Image id="ExampleWebsitename-logo.32x32" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-32.png"/>
          <bt:Image id="ExampleWebsitename-logo.48x48" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-48.png"/>
          <bt:Image id="ExampleWebsitename-logo.80x80" DefaultValue="https://localhost:3000/assets/ExampleWebsitename-logo-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Taskpane.Url" DefaultValue="https://release.ExampleWebsitename.net/?mobileapp=true/#/outlook"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="ExampleWebsitename Outlook Add-in"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="New Create Task"/>
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

问题出在 https 和 http 协议添加上。我们必须在 Appdomain 内的同一域的 Http 和 Https 中添加单独的 URL,问题就解决了。我们还使用了一个名为 fiddler 的工具来获取域中的任何其他内部路由。