简体   繁体   中英

Azure MobileServiceClient stopped working after updating Visual Studio to 16.3.7

I have a Xamarin Forms app for Android that uses a MobileAppService to retrieve data from an Azure SQL Database with EntityFramework, this worked well until I updated Visual Studio to 16.3.7, now the MobileAppService doesn't retrieve anything, I don't get exceptions or anything it just returns null.

This is the query I'm trying to run, I've tried with others and it's the same, it just returns null.

Also, my app service is up and running I tried querying directly and it works!

The url to my app service: https://avalis.azurewebsites.net

async Task<Usuario> IAzureAppService.GetUsuarioByUsernameAsync(string username){
        Initialize();
        return (await usuariosTable.Where(r => r.NombreUsuario == username).ToEnumerableAsync()).FirstOrDefault();
}

Here is the about of my Visual Studio

As a workaround, adding an HttpHandler on the client constructor makes it work!

client = new MobileServiceClient(AzureUrl, new HttpClientHandler());

Answer by Brendan Zagaeski originally found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM