Alexey
Alexey

Reputation: 35

MobileServiceInvalidOperationException is thrown on Xamarin.WindowsPhone 8.1 project

I'm trying to use Azure Mobile Services and Xamarin. I follow all instuctions of official tutorial, created Azure backend for application and downloaded sample quick-start app for Xamarin.Forms from Azure. There is code in TodoItemManager.cs:

public async Task<ObservableCollection<TodoItem>> GetTodoItemsAsync(bool syncItems = false)
    {
        try
        {
            IEnumerable<TodoItem> items = await todoTable
                .Where(todoItem => !todoItem.Done)
                .ToEnumerableAsync();

            return new ObservableCollection<TodoItem>(items);
        }
        catch (MobileServiceInvalidOperationException msioe)
        {
            Debug.WriteLine(@"Invalid sync operation: {0}", msioe.Message);
        }
        catch (Exception e)
        {
            Debug.WriteLine(@"Sync error: {0}", e.Message);
        }
        return null;
    }

And I got MobileServiceInvalidOperationException with message "Invalid sync operation: The request could not be completed. (Not Found)".
I have tested Azure Backend on UWP App and it works fine. So looks like there is problem in WP8.1 project. Can anybody help with this exception?

Upvotes: 0

Views: 81

Answers (1)

Alexey
Alexey

Reputation: 35

So.. I forgot to enable internet connection on my Windows Phone

Upvotes: 1

Related Questions