Windows 应用商店 CurrentApp.LoadListingInformationAsync() - 错误 0x801900cc [英] Windows Store CurrentApp.LoadListingInformationAsync() - error 0x801900cc

查看:29
本文介绍了Windows 应用商店 CurrentApp.LoadListingInformationAsync() - 错误 0x801900cc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用商店中有一个 Windows 8.1 应用程序,但是当我尝试使用下一段代码来实现我想添加到我的应用程序的新功能时

I have a Windows 8.1 app on the Store, but when I try to use the next piece of code for a new feature I want to add to my app

var listingInfo = await CurrentApp.LoadListingInformationAsync();

我收到一个错误,我不知道它是什么意思.不过,我确实发现了错误,并将其显示在 MessageDialog 上,然后进行了打印屏幕.这是错误:

I receive an error which I don't exactly know what it means. I did catch the error though and I displayed it on a MessageDialog and then I took a print screen. This is the error:

We could not receive your donation due to an unexpected error:
System.Exception: Exception from HRESULT: 0x801900CC
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
    at ArchMedia_Player.Services.Donations.<ListingInformationAsync> d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
    at ArchMedia_Player.Services.Donations.<Donate>d__a.MoveNext()

有谁知道这是什么意思,我该如何解决?我还提到这完全可以:(使用 CurrentApp 模拟器)

Does anybody know what that means and how can I solve it ? I also mention that this works perfectly ok: (using the CurrentApp Simulator)

var listingInfo = await CurrentAppSimulator.LoadListingInformationAsync();

推荐答案

System.Exception:来自 HRESULT 的异常:0x801900CC

System.Exception: Exception from HRESULT: 0x801900CC

这是您开发应用时的预期异常.错误码为BG_E_HTTP_ERROR_204,0xCC编码HTTP响应错误码.0xCC == 204,HTTP 错误 204 表示无内容".或者换句话说,商店服务器不知道您的应用程序有任何应用程序内购买.

That's an expected exception while you are developing your app. The error code is BG_E_HTTP_ERROR_204, 0xCC encodes the HTTP response error code. 0xCC == 204, HTTP error 204 means "No content". Or in other words, the Store server is not aware of your app having any in-app purchases.

这是一个先有鸡还是先有蛋的问题,直到您提交应用并获得批准后,服务器才会知道您的应用内购买.您必须使用 CurrentAppSimuator 测试您的应用程序以调试和测试您的应用程序内购买.基本操作指南在这里.您绝不能忘记的一个重要步骤是,在您提交应用以供验证之前,将 CurrentAppSimulator 替换为 CurrentApp.

This is a chicken-and-egg problem, the server doesn't know about your in-app purchases until after you submitted your app and got it approved. You must test your app with CurrentAppSimuator to debug and test your in-app purchases. The basic how-to guide is here. One important step you must not forget is to substitute CurrentAppSimulator with CurrentApp just before you submit your app for verification.

当您向新版本添加应用内购买时,您的应用已经在应用商店中不会被考虑在内.关键的必需步骤是让商店服务器知道您的购买选项.如链接的 MSDN 文章所述,您在提交应用程序时执行此操作.在您的提交获得批准之前,它们不会生效.

That your app is already in the Store does not factor in when you added in-app purchases to your new version. The crucial required step is to make the Store server aware of your purchase options. As described by the linked MSDN article, you do this when you submit the app. They will not be effective until your submission is approved.

所以,不要惊慌,您可以使用模拟器测试您的代码.当您确认自己可以正常工作时,只要您按照 MSDN 文章中的步骤操作,就无需担心在提交应用后会出现此问题.

So, do not panic, you can test your code with the simulator. When you've verified that you got that working, there's little reason to fear this being a problem after you submitted the app, as long as you follow the steps in the MSDN article.

这篇关于Windows 应用商店 CurrentApp.LoadListingInformationAsync() - 错误 0x801900cc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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