hello,
i got this error message "The underlying connection was closed: An unexpected error occurred on a receive." when getting leaderboard data using dotnet sdk , the error happened suddenly on server (was working before ) and working fine on local machine
this is the code :
private async void GetLeaderboardServerSide()
{
PlayFabSettings.TitleId = System.Configuration.ConfigurationManager.AppSettings["playfabTitleID"]; PlayFabSettings.DeveloperSecretKey= System.Configuration.ConfigurationManager.AppSettings["Secret_Key"]; GetLeaderboardRequest request = new GetLeaderboardRequest()
{ StartPosition = 0, MaxResultsCount = 10, StatisticName = "Total Happiness", ProfileConstraints = new PlayerProfileViewConstraints()
{ ShowContactEmailAddresses = true, ShowDisplayName = true, ShowAvatarUrl = true }, };
PlayFabResult<GetLeaderboardResult> x = await PlayFabServerAPI.GetLeaderboardAsync(request);
var apiError = x.Error;
var apiResult = x.Result;
if (apiError != null) { _msg = apiError.ErrorMessage; }
else if (apiResult != null)
{ lbList = apiResult.Leaderboard; } }