XboxLiveDevelopment


StatsManager AddLocalUser


Hi,
I am using the C# API via the Xbox Live Creators Program. The SignIn and Profile API's are all working great (able to get Gamertag/Gamerpic) however I am not able to use the StatsManager at all. I have studied the Unity C# implementation and have derived
to use the following code in my game -
XboxLiveUser user = new XboxLiveUser();
SignInResult x = await user.SignInAsync(); //this returns successfully
statManager = StatsManager.Singleton;
statManager.AddLocalUser(user);
Then in my main loop I am doing
List<StatEvent> statevents = statManager.DoWork();
if (statevents.Count>0)
{
}
This never returns that the local user was added event. When I have tried to do other things such as setting/getting stats that also does not work, but I have traced it to the fact that it never adds the local user. What could be the problem? if needed I
can provide my sandbox, titleid, etc...
Thanks
Your configuration is not being loaded properly, so that means that the URL that the request is using is invalid. In this case the url is
/stats/users/{xuid}/scids/ but it should actually be
/stats/users/{xuid}/scids/{scid}.
We can make sure that it throws a better error when the SCID is missing.
You should have an XboxServices.config file which should contain look like this (with a different GUID):
{
... other properties.
"ServiceConfigurationId": "00000000-0000-0000-0000-1234ABCD5678",
}
Hey Neil,
I saw your response on Stackoverflow, but I'm still having a hard time getting this error to reproduce internally. Can you do two things for me to help reproduce the issue?
Use Fiddler (http://www.telerik.com/fiddler) or some other network analyzer to capture a trace of the request being made (make sure that SSL decryption is enabled) so we can verify exactly which request is failing. Additionally, if you could provide
me with your DevCenter application ID so I can verify all of your configuration.
Thanks Ben, here are my application ID's
Package/Identity/Name
14551BlazerStudios.MadBallRacer
Package/Identity/Publisher
CN=0FFAF3C1-0CD7-48DE-A6BD-FF3D9400BF58
Store ID
9mw4zpp4kwfz
and here are 3 screenshots from fiddler as to where it is failing
Link1
Link2
Link3
Your configuration is not being loaded properly, so that means that the URL that the request is using is invalid. In this case the url is
/stats/users/{xuid}/scids/ but it should actually be
/stats/users/{xuid}/scids/{scid}.
We can make sure that it throws a better error when the SCID is missing.
You should have an XboxServices.config file which should contain look like this (with a different GUID):
{
... other properties.
"ServiceConfigurationId": "00000000-0000-0000-0000-1234ABCD5678",
}
Yes that was it, I had it called PrimaryServiceConfigId based on what was in the
documentation, but in the C# API it expects ServiceConfigurationId
as you pointed out. Switched it and it worked.
Thanks!

Related Links

XBox Live C# Samples?
Unreal Engine 4 source code verification
Creators Program Stats
Whitelisted?
XBOX and Hotmail account merging
StatsManager AddLocalUser
Get Microsoft Xbox friends list
Xbox live Api REST
UWP Unity Sample, Missing Assembly
Cannot Update Xbox Live Creators Program Leaderboard
Xbox live c# development (no unity)
StatisticUpdateComplete Documentation or Example
young children developing games
[XboxLiveDevelopment] [UWP] [LIVE]
LeaderBoard Display
Launch date?

Categories

MSDN
Microsoft Office for D...
JScript and Scripting
Bing Maps
Office Live Development
Visio 2010
Archive
Archived Forums T-U
OneDrive Development
Kinect for Windows SDKs
Maps In Windows
Virtualization
Software Entwicklung f...
Visual Studio Integrate
Testing with Visual St...
Visual Studio Diagnost...
Application Insights (AI)
Visual Studio Graphics...
Media Foundation Devel...
Windows Desktop Debugging
Developing Apps for Sh...
SharePoint 2013 - Deve...
SharePoint 2010 - Setu...
SharePoint Legacy Vers...
Azure Mobile Apps
Azure Notification Hubs
Azure Log Analytics
Azure App Service - AP...
Team Foundation Server...
Team Foundation Server...
BizTalk Server Adapter...
BizTalk Server RFID
LINQ to SQL
XML, System.Xml, MSXML...
JScript Native
ISV Open Discussions
Small Basic
Microsoft Robotics - D...
Microsoft Device Emulator
Standard 7: Tools
Standard 7: Misc
Windows Embedded Compa...
SQL Server 2012 PowerP...
SQL Server 2012 Integr...
SQL Server 2012 Spatia...
SQL Server 2012 PowerP...
SQL Server 2012 Databa...
Windows Live Messenger...
Windows Live Writer: D...
WebsitePanel - Support
Bing Maps WPF, WP7/8/8...
Exchange Server Develo...
WCF RIA Services with ...
Designing with Silverl...
Connected Services Fra...
Surface Application De...
.NET Remoting and Runt...
Announcements about pr...
AppFabric Service and ...
App Producer (archived)
Building Windows Store...
Casablanca
Charts & Reports in th...
CHESS – Find and Repro...
Dynamic Languages on .NET
Chart Controls for .NE...
Game Technologies: XNA...
General Troubleshootin...
Getting Started With V...
Git, Mercurial and Dro...
LINQ Project General
LightSwitch HTML Clien...
Microsoft Unified Comm...
Office Live Small Busi...
Office Live Small Busi...
Parallel Computing Gen...
patterns & practices: ...
Regular Expressions
Search Server: Develop...
Search Server: Federation
Search Server: Report ...
Silverlight (formerly ...
SQL Server Modeling
SQL Server 2014 Analys...
SQL Server 2014 Report...
SQL Server 2014 Master...
SQL Server 2014 Integr...
Visual Basic Power Packs
Visual C# Express Edition
Visual J# General (Ret...
Visual Studio 2008 Exp...
Visual Studio Editor i...
Visual Studio UI Autom...
Visual Studio Online "...
WCF Data Services (Pre...
Windows Live Search: D...
XNA Game Studio Express
Maps In Windows - APIs

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile