G'day all,
我们正在创建一个Windows 8 Metro应用程序,以便在公司防火墙后面使用,但在通过WNS支持推送通知时遇到代理配置问题。
系统代理配置适用于桌面,并且在通过
查看时也正确配置netsh winhttp show proxy
我有一个非常简单的应用程序来重现这些问题。通过以下代码进行正常的webrequest时:
var req = WebRequest.Create("https://sincd.wns.windows.com");
var response = await req.GetResponseAsync();
TxtMessage.Text = "Content-Length: " + response.ContentLength;
我正确地获取了数据,并且wireshark跟踪显示了按预期连接到内部代理的数据包。
不幸的是,尝试通过
创建推送频道var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
无法返回(导致超时)。 wireshark轨道显示三次尝试直接连接到上游服务器(即不是代理),如下所示:
No. Time Source Destination Protocol Length Info
4 0.404841 10.65.94.80 sincd.wns.windows.com TCP 66 netadmin > https [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
5 3.406263 10.65.94.80 sincd.wns.windows.com TCP 66 netadmin > https [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=256 SACK_PERM=1
6 9.406293 10.65.94.80 sincd.wns.windows.com TCP 62 netadmin > https [SYN] Seq=0 Win=8192 Len=0 MSS=1460 SACK_PERM=1
从对NetworkInformation.GetProxyConfigurationAsync()的调用返回的ProxyConfiguration信息也显示正确配置的代理条目。
有没有办法手动配置PushNotificationChannelManager的代理信息?
干杯,