3

I have a project which supports background task.

At client's end, when application tries to make web service connection, net_http_client_execution_error is observed.

Stack contains some Base address codes.

I can't figure out what could be the possible reason.

Any help will be much appreciated.

Note: I am unable to reproduce this error on my system (either in debugging or release mode)

Saadi
  • 2,211
  • 4
  • 21
  • 50
Shweta Goyal
  • 94
  • 1
  • 9
  • 4
    unless we see something we can't help - this is some related issue as you expressed here hope this will help [http://stackoverflow.com/questions/33259763/uwp-enable-local-network-loopback] – KhawajaAtteeq Jun 01 '16 at 05:53
  • I get net_http_client_execution_error when I put the device in airplane mode, simulating a lost connection, and then suspend the app. – ezaspi Oct 28 '16 at 15:23

1 Answers1

0

During registration of your background task you will need to set the IsNetworkRequested property (or use the InternetAvailable condition): https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.Background.BackgroundTaskBuilder#Windows_ApplicationModel_Background_BackgroundTaskBuilder_IsNetworkRequested

Otherwise you will not be able to access the network from your background task when the device goes into connected standby.

Thanks, Stefan Wick - Windows Developer Platform

Stefan Wick MSFT
  • 13,600
  • 1
  • 32
  • 51