xbox-live

StatsManager throws Error on AddLocalUser


I am trying to use the C# StatsManager by first adding the localuser. My code is the following

XboxLiveUser user = new XboxLiveUser();
SignInResult x = await user.SignInAsync(); //returns successfully
statManager = StatsManager.Singleton;
statManager.AddLocalUser(user);

main loop:

List<StatEvent> statevents = statManager.DoWork
if (statevents.Count>0)
{

}

The local user added event never fires and instead it throws an error in the API which is the following. Throws an error on

getResponseCompletionSource.SetResult(getResponseTask.Result);

XboxLiveHttpRequest.cs Line 117

An exception of type 'System.AggregateException' occurred in mscorlib.ni.dll but was not handled in user code

One or more errors occurred. (One or more errors occurred. (The remote server returned an error: (404) Not Found.))

what do you think could be the problem? The other API's work, able to sign in, get GamerTag and GamerPic from Socialmanager, etc...

also see screenshoterror in API

Thanks


Solution

  • This error can occur if there is something wrong with the XboxServices.config file loaded by your project.

    Verify that the configuration file contains a ServiceConfigurationId property that's set to the appropriate value.

    Note: If you use the Xbox Live Association Wizard it should automatically pull down the appropriate value and populate the .config file.