[UWP] [WP10]如果启用了代理且地址不正确,则无法获取许可证信息 [英] [UWP] [WP10] Cannot get licence information if proxy is enabled and Adress is incorrect

查看:104
本文介绍了[UWP] [WP10]如果启用了代理且地址不正确,则无法获取许可证信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!
$


我们在WP10上测试UWP应用时遇到了问题。

开始时,应用程序正在尝试从商店获取许可证信息以检查已经购买的应用程序。



如果您在WP10设备上使用代理错误的地址 - 应用程序崩溃并且错误0x803F6107在该行:


var info = await CurrentApp.LoadListingInformationAsync();
$


将此行包装到try / catch块中没用,因为应用程序几乎每次都崩溃。

当您在Visual Studio中调试此代码时,您会捕获异常,然后应用程序继续运行。但是如果你在没有Visual Studio的情况下启动app,它会在很长的启动画面时间后崩溃。



要重现这个问题,请做下一个:

1.在WP10设备上启用代理(手动设置),例如本地计算机的IP地址和端口8888。

2.在本地计算机上,我们使用Fiddler调试Web连接,以便Fiddler扮演代理角色。要重现此错误,必须关闭Fiddler。  

3.然后开始调试。当您的代码开始与Windows Store的API交互时,您将捕获异常。



我找到了相关主题,但没有澄清任何内容。此外,没有关于代理的问题。

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c9653f06-0d48-498f-9b3e-335435780fd4/cw81windows-81 -app-license-error-0x803f6107?forum = wpdevelop



谢谢!

解决方案

< blockquote>

嗨Igor Zelenokhat,   < span style ="font-size:medium">



 >>应用程序崩溃,错误0x803F6107在该行:var info = await CurrentApp.LoadListingInformationAsync();


您的应用是否已在Windows应用商店中列出?我有
调试
这个代码在我身边有一个应用程序
未在windows商店中列出,它引发了与你相同的异常。 根据 的评论 CurrentAppSimulator


在应用程序列在Windows应用商店之前,  CurrentApp   对象
将无法在应用中使用。  使用  CurrentAppSimulator 在开发应用时测试应用的许可和应用内商品。


因此,如果您的应用尚未在Windows应用商店中列出,请使用  CurrentAppSimulator类进行测试,如下所示:

 var info = await CurrentAppSimulator.LoadListingInformationAsync(); 



还有一个官方样本用于应用程序内购买,Scenario2具有检查应用程序当前许可证状态的功能。你能不能测试

Scenario2
官方样本
何时启用代理?


Hello!

We faced the problem while testing UWP app on WP10.
At start the application is trying to get licence information from store to check app already been purchased.

If you use proxy with wrong Adress on your WP10 device - app crashes  with error 0x803F6107 at the line:

var info = await CurrentApp.LoadListingInformationAsync();

Wrapping  this line into a try/catch block is useless, because app crashes almost every time.
When you debug this code in Visual Studio you catch an exception and then app continues to run. But if you start app without Visual Studio it's going to crash after a very long splash screen time.

To reproduce this issue do next:
1. Enable proxy (Manual setup) on your WP10 device with IP-adress of your local machine and port 8888, for example.
2. On local machine we use Fiddler to debug web connection so Fiddler plays role of proxy. To reproduce this bug Fiddler has to be closed.  
3. Then just start debuging. You'll catch exception when your code start to interact with API for Windows Store.

I found related topic, but nothing was clarified. Also, there was no issues about proxy.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c9653f06-0d48-498f-9b3e-335435780fd4/cw81windows-81-app-license-error-0x803f6107?forum=wpdevelop

Thank you!

解决方案

Hi Igor Zelenokhat, 

 >>app crashes  with error 0x803F6107 at the line: var info = await CurrentApp.LoadListingInformationAsync();

Has your app been listed in the Windows Store? I have debugged this code in my side with a app not listed in the windows store,  it threw the same exception as you got. According to the remarks of CurrentAppSimulator,

Until the app has been listed in the Windows Store, the CurrentApp object won't work in the app.  Use the CurrentAppSimulator to test your app's licensing and in-app products while you develop your app.

So if your app hasn't been listed in the Windows Store, please use the  CurrentAppSimulator class for testing  like follows:

var info = await CurrentAppSimulator.LoadListingInformationAsync();

There is also an official sample for in-app purchase, the Scenario2 has feature of  checking the current license status of an app. Could you please test the Scenario2 of official sample when proxy is enabled?


这篇关于[UWP] [WP10]如果启用了代理且地址不正确,则无法获取许可证信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆