Unity 5 WSA azure

I am trying to use azure web service with windows store 8.1/8.1 windows phone build.
I created fake plugin with .net 3.5 and the real one as Class library(Windows 8.1) .
They are placed like in WSA plugin manual(fake as editor and in Plugin folder and the real in WSA folder). They both are build by Release.
I am using Api compatibiltiy level: .NET 2.0 and Compilation overrides: Use Net Core.
Unity3d version 5.0.0f4

Plugin setup:

Fake Plugin:

namespace Azure
{
    public class Connect
    {
        public  void insert()
        {
        }
    }
}

Real Plugin:

namespace Azure
{
    public class Connect
    {
        public static MobileServiceClient MobileService = new MobileServiceClient(
                 "https://testazure.azure-mobile.net/","ur password");
        public async void insert()
        {
            TodoItem item = new TodoItem { Text = "Awesome item", Complete = false };
            await MobileService.GetTable<TodoItem>().InsertAsync(item);
        }
    }
    public class TodoItem
    {
        public string Id { get; set; }
        public string Text { get; set; }
        public bool Complete { get; set; }
    }
}

Test class:

public class test : MonoBehaviour {

    Connect boom;

    void Start () 
    {
        boom = new Connect(); 
     }
    public void shoot()
    {
        boom.insert(); // here it crash
    }
}

When I am firing azure by clicking button I get unhandled expection in “combase.dll in Template.exe”.

When I am trying to build it on windows phone I get error too.

Does any one have idea what is wrong? Maybe it’s just Unity3d bug ?
I’am uploading project with as zip if someone wanna figure out what is going on.

2096445–137214–last.zip (1.15 MB)

Hey,

tried your project, enabled following debugging features:

  • Tools->Options->Debugging->General->Disable Enable Just My Code
  • Enable all exceptions in Debug->Exceptions menu

run the application, skip harmless exceptions.

Finally you should see the following errors from Azure:

A first chance exception of type 'Newtonsoft.Json.JsonReaderException' occurred in Newtonsoft.Json.DLL

Additional information: Error reading JToken from JsonReader. Path '', line 0, position 0.

If there is a handler for this exception, the program may be safely continued.

followed by

A first chance exception of type 'Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException' occurred in Microsoft.WindowsAzure.Mobile.DLL

Additional information: The request could not be completed.  (Not Found)

If there is a handler for this exception, the program may be safely continued.

which is probably happens because of the first exception.

Hope that hints you what might be the error.

Ok I just figured out I didn’t published backend to azure services.

For Azure Mobile Services .NET backend yes you need to take a code-first approach and publish from Visual Studio, which will generate all the tables in your database.