Office Addin 调试确保网址可访问

问题描述 投票:0回答:1

我收到此错误事件,尽管我可以从

https://localhost:4200/manifest.xml
访问 xml 文件,即使我充当
127.0.0.1:4200/manifest.xml
但它不起作用,因为我没有该 ip 的证书。我在本地测试。有没有办法指定一个 url,
office-addin-debugging
将在其中查找清单文件。

我能够通过像这样运行 Angular 来使其工作

npm run start -- --host 127.0.0.1 --port 4200
or
ng s --host 127.0.0.1 --port 4200

但我真的不想这么做

我用来运行调试器的命令是:

office-addin-debugging start path/to/manifest.xml web --document <url>

它可以连接到此https://developercommunity.visualstudio.com/t/Office-WordExcel-Addin-is-not-opening-f/10533893?space=41&sort=newest

angular office365 office-js office-addins
1个回答
0
投票

您在这里组合了一些东西,我建议将它们分开。

您需要一个

webserver
,然后需要启动
debugging

你说你通过以下方式让它工作:


npm run start -- --host 127.0.0.1 --port 4200

ng s --host 127.0.0.1 --port 4200

但我真的不想这么做


我不确定你为什么不想这样做?

您的流程应该是通过以下方式“启动网络服务器”:

ng s --host 127.0.0.1 --port 4200

然后通过以下方式开始调试:

office-addin-debugging start path/to/manifest.xml web --document <url>

office-addin-debugging 并不意味着启动应该已经在运行的网络服务器进程。如果上述内容对您有用,我认为您的设置没有任何问题。

注意:如果您的 SSL 证书适用于 localhost 或 127.0.0.1,并且其中之一导致问题,请调整清单以匹配浏览器中正在运行的任何 URL,而不是尝试修复您的证书。

© www.soinside.com 2019 - 2024. All rights reserved.