通过Hololens访问IBM Watson API时的HTTPS状态代码0

通过Hololens访问IBM Watson API时的HTTPS状态代码0,https,firewall,ibm-watson,hololens,Https,Firewall,Ibm Watson,Hololens,我在上面的代码中得到了一个infinte循环。这在Watson.cs 它在Unity editor中运行良好。当部署到Hololens中时会发生此问题。我从Watson SDK检查了RESTConnector.cs文件,我得到了HTTPS状态代码0,但我得到了Unity editor的状态代码200。我不知道为什么会这样。如果这是一个防火墙问题,我如何在Hololens中修复它 要启用设备的网络功能,您需要在发布设置/功能下启用[InternetClient]。本教程显示了这些功能的具体说明:。

我在上面的代码中得到了一个infinte循环。这在
Watson.cs


它在Unity editor中运行良好。当部署到Hololens中时会发生此问题。我从
Watson SDK
检查了
RESTConnector.cs
文件,我得到了
HTTPS状态代码0
,但我得到了Unity editor的
状态代码200
。我不知道为什么会这样。如果这是一个
防火墙
问题,我如何在Hololens中修复它

要启用设备的网络功能,您需要在发布设置/功能下启用[InternetClient]。本教程显示了这些功能的具体说明:。并检查能力设置的统一指南:

此外,根据以前案例的经验([WSA]ISNETWORKERROR在X86架构()上运行UWP应用程序时总是返回TRUE),unity的一些特定版本会使项目在构建后出现一些网络问题。因此,如果启用[InternetClient]后问题仍然出现,请提供您正在使用的unity版本

credentials = new Credentials(tokenOptions, _serviceUrl);

     if(credentials != null) Debug.Log("Credentials is not null!");
     //  Wait for tokendata
     while (!credentials.HasIamTokenData())
     {
         Debug.Log("In the while loop"); // INFINITE LOOP ON Hololens
         yield return null;
     }