0
votes

Facing a very strange issue.

Following this guide https://azure.microsoft.com/en-in/documentation/articles/app-service-mobile-xamarin-forms-blob-storage/ to implement File Sync in Xamarin Forms app.

The Get method in my service (GetUser, default get method in App service controller) is being called thrice & on the 3rd iteration it gives me a 404 resource not found error. First 2 iterations work fine. This is the client call

await userTable.PullAsync(
                        null,
                        userTable.Where(x => x.Email == userEmail), false, new System.Threading.CancellationToken(), null);

If I remove the following line,

// Initialize file sync
this.client.InitializeFileSyncContext(new TodoItemFileSyncHandler(this), store);

then the code works just fine, without any errors. I will need some time doing a sample project, meanwhile if anyone can shed some light, it will be of help.

Thanks

2

2 Answers

0
votes

This won't be an answer, because there isn't enough information to go on. When you get a 404, it's because the backend returned a 404. The ideal situation is:

  • Turn on Diagnostic Logging in the Azure Portal for your backend
  • Use Fiddler to monitor the requests
  • When the request causes a 404, look at what is actually happening

If you are using an ASP.NET backend (and I'm assuming you are because all the File tutorials use ASP.NET), then you can set a breakpoint on the appropriate method in the backend and follow it through. You will need to deploy a debug version of your code.

0
votes

this is sorted now, eventually I had to give it what it was asking for. I had to create a storage controller for User too, although I don't need one as I don't need to save any files in storage against the users.

I am testing the app further now to see if this sorts my problem completely or I need a storage controller for every entity I use in my app.

In which case it will be really odd as I don't intend to use the storage for all my entities.