-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HeadedDemo not working when the device locked screen or logged out #55
Comments
What do yo mean with "when I log out", because if you would really do that, the HeadedDemo will quit (as with all other apps). Do you mean you lock the screen, or close your remote session? |
@tomkuijsten I mean |
Hey @liudanking, I think this is because your app will be suspended when there's no active remote session, I think if you put this code in the OnLaunched event in the App.xaml it should work:
See: http://blog.qmatteoq.com/the-new-background-features-in-windows-10/ for background information. If this doesn't work you'll have to do use a BackgroundTask with a SocketActivityTrigger and somehow call into (a copy of) the HttpServer: https://msdn.microsoft.com/en-us/windows/uwp/networking/network-communications-in-the-background which might be way too complex for what you're doing... Cheers, Jark |
Would a headless app work for you, I guess that will work, even under lock. Worth the try. |
I think @liudanking is running on Windows 10, afaik headless apps are not (yet) supported there. |
@Jark @tomkuijsten Yes, I am running HeadedDemo on Windows 10. |
Hi @Jark |
Hey @liudanking, I did test For Question I have is: do you really need support for uwp? If you can use standard .Net then the HttpListener might work better for you and gives you more flexibility. |
@Jark I have tested |
@Jark |
Hi @liudanking, Apologies for the late reply, have been quite busy with personal and work life. I don't know of any way to launch the app in debug mode without visual studio, but it might be worth revisiting the ExtendedExecutionSession, since it is supposed to disallow suspending, see: http://blog.qmatteoq.com/the-new-background-features-in-windows-10/ In my test (to be fair, I tested only once and didn't really tested it extensively) I did the following:
It should be a lot easier to see what is happening after #42 is done, because then we can log any unhandled exceptions, if we're allowed the extended execution session or not, etc. But no one is currently working on that, so it might be a while before we can get to the bottom of it. Let me know how you get on, would be very interested to hear if / how you get it to work! Cheers, Jark |
Hi, @Jark Appreciate your tracking. I have tested
Some interesting results learned:
From the article,http://blog.qmatteoq.com/the-new-background-features-in-windows-10/:
The author may mean that: |
Any new insights on this matter? |
Looks like this is not really a common problem, as we don't get any other issue about this. I suggest to close it to keep the backlog clean (would still be accessible through the archive). Let me know if you think otherwise. |
I run HeadedDemo as a small web server on machine A, and visit it from a remote machine B.
All works well when I log in machine A.
When I log out machina A and keep HeadedDemo running on machine A, I can NOT get any response from machine B. If I log in machine A from remote-desptop app again, response is returned as what I want.
Is this what windows universal app designed for? Can I keep HeadedDemo running even I log out machine A?
The text was updated successfully, but these errors were encountered: