question

NicoZhu-MSFT avatar image
NicoZhu-MSFT asked ·

Windows store app - How to avoid App Hang when app is doing a Server communication process for long time?

Hi,

I am having a widows store app running in Windows 8.1. In that, I am doing some server communication. the process step is as below


  1. Before starting server communication, i show a loading screen by showing a UI with Progress ring in a popup.


  2. Disable the Corewindow's input as below to avoid any interaction in UI.

    Window.Current.CoreWindow.IsInputEnabled = false

  3. Start the function which talks to server. [Which takes maximum 15 seconds to 25 seconds]

  4. Once get the response from server, i close the popup

  5. I enable the Corewindow's input as below for enabling app's interaction



      await Task.Delay(TimeSpan.FromSeconds(0.1));
         Window.Current.CoreWindow.IsInputEnabled = true;
         await Task.Delay(TimeSpan.FromSeconds(0.1));
    

When the app showing, i am just touching the loading screen continuously. now app crashes and eventlog says that it is as App Hang.

How to solve this?

anyone please give me solution..

Thanks.









windows-uwpwindows-uwp-xaml
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NicoZhu-MSFT avatar image
NicoZhu-MSFT answered ·

Hello,

The error log looks coming from the server communication. And please avoid set IsInputEnabled as false In general, we use Loading control to disable input during the service connection.


alt text



Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.