Reputation: 651
I am trying to upload some recorded audio files on sky drive after uploading some file i am getting an exception "The application request limit has been reached".
how to handle this exception. please suggest some solution.
Thank you
Upvotes: 1
Views: 112
Reputation: 651
After refering the link [1]: http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.backgroundtransfer.backgroundtransferservice%28v=vs.105%29.aspx i found that background transfer service is capable of holding only 25 open requests at a time therefore it gives such exception. To handle the above exception i used following code.
List<BackgroundTransferRequest> list = BackgroundTransferService.Requests.ToList();
foreach (BackgroundTransferRequest item in list)
{
if (item.TransferStatus == TransferStatus.Completed)
{
BackgroundTransferService.Remove(item);
}
}
Apply this code when your request get completed. and if the request count reaches to 25 request stop sending more request until the previous are completed.
Upvotes: 1