What needs to be done in MAUI Blazor so the Android emulator can access the Internet?

Tom Snow 1 Reputation point
2022-08-24T17:30:29.343+00:00

I'm developing a MAUI Blazor Application that the front-end has been working fine across Windows & Android emulators, as well as, an Android local device until now.

Recently I added access to an external/remote MySQL backend database which works fine in the Windows emulator, but I get the "The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception" error when I try to Open the connection in the Android emulator.

I wanted to prove if I could access the internet via the Android emulator or local device, so I created a "Ping test" blazor page. The Ping test works fine in the Windows emulator but fails in the Android emulator & device.

Which takes me back to my original question: What needs to be done in MAUI Blazor so the Android emulator can access the Internet?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,500 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,231 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2022-08-24T19:50:11.78+00:00

    1) you must configure the desired emulator device via AVD manager to support network access (under actions)

    2) be sure WiFi is enabled in setting in emulator (home -> settings).