Skip to content

NetworkInformation.GetInternetConnectionProfile() throws on background threads #2965

@mattleibow

Description

@mattleibow

Describe the bug

Previously in UWP, calling the NetworkInformation.GetInternetConnectionProfile() method would return the network information - regardless of the thread used.

In WinUI, this gives a COMException if it is not on a "main" thread.

Original issue: dotnet/maui#10062
Workaround: dotnet/maui#9972

Steps to reproduce the bug

  1. Call NetworkInformation.GetInternetConnectionProfile(); on a background thread/task.

Expected behavior

No exception

Screenshots

No response

NuGet package version

1.1.4

Packaging type

Packaged (MSIX)

Windows version

Windows 10 version 21H2 (19044, November 2021 Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions