Okay I tried to play a little bit with the StatsManager but I always got an exception trying to use anything with it when comes to
Because I doubted myself I had the idea just to use the UWPIntegration sample that is on Github . I also added the Leaderboard items to my own project so the code works with my test sandbox. Logging in works as it should just StatsManager causes the issues.
But as with my own code I just get the same error / exception which is the following. I assume there is a bug in the code provided or the service configuration is not working as intended.
System.AggregateException occurred HResult=0x80131500 Message=One or more errors occurred. Source= StackTrace: at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.Xbox.Services.XboxLiveHttpRequest.<>c__DisplayClass35_0.<GetResponseWithAuth>b__1(Task
1 getResponseTask) in D:\Data\VisualStudio\Projects\xbox-live-api-csharp\Source\api\XboxLiveHttpRequest.cs:line 117 at System.Threading.Tasks.Task.Execute()Inner Exception 1: AggregateException: One or more errors occurred.
Inner Exception 2: WebException: The remote server returned an error: (404) Not Found.
Issue was found. My service.config used a wrong parameter name, see below in the comments of the solution.
There are a few different reasons why this might be the case. Not surprisingly, it means the cloud can't find the stat you've requested.
If you use Fiddler, you can capture the call and share with me the correlationID header. If you don't know Fiddler, let me know and I can help you.
However, some ideas off the top of my head
Make sure that you're in development mode - your sandbox is the one from the dev center site. If you aren't sure, you can use the Windows Device Portal to see what your sandbox is - just click on Xbox Live in the left hand navigation.
Make sure you have hit "Test" on the dev center page where you defined your featured stats and leaderboards.
Make sure you are requesting the stat by the ID name you specified in the config window, not the display name.