UWP Background Tasks unregistered after store update - win-universal-app

Do my Windows 10 App Backgroundtasks unregister while you update the app with the store?
Will the app deinstall and install or do I have to unregister my backgroundtask manual if I made a change in the backgroundtask registration?

Do my Windows 10 App Backgroundtasks unregister while you update the
app with the store?
No, according to MSDN, when an app gets updated, only running background tasks get canceled, not unregistered:
The background task was canceled because the application was updated.
You shouldn't need to register your background tasks again, however, it's not a bad practice to check for background tasks in the app startup and register any tasks that are not already registered. You can get list of the registered background tasks from the BackgroundTaskRegistration.AllTasks property.
However, if you want a background task with different properties/conditions, you need to unregister the old one and register the new one again, since you need a different background task.

Related

Scheduler not firing

I have a development instance on my laptop and for some reason I cannot get any Automation schedules to fire. If I create a schedule, it looks ok and shows the appropriate next execution time, but it never changes. What am I missing to enable the scheduler?
If you restored a snapshot on your site, you will need to go to screen Automation Schedules screen (SM205030) and click on Initialize Scheduler action.
This action exists in order to prevent schedules to be run directly after restoring a backup of an environment.
This was done to prevent necessary actions from happening on a test environement, e.g. spamming customers email, uploading important files to file provider, etc.
This is why this button need to be manually clicked after restoring a backup.
With the help of support, I was able to resolve this. We deleted the application from the configuration manager and recreated it. The scheduler then started working. There was nothing obviously wrong, but creating the new instance worked.

App rejected for fetching user's location in background for Apple Watch app

We have introduced a Watch component in our iOS application. If a user launches the app on the Apple Watch, they will be able to see the timing for the next prayer, and the countdown to it, based on their current location.
The user should be able to view this information on the Watch even if the app on the phone is not launched. For this purpose, we need to use Background Location, to ensure we have the user’s current location at all times. The prayer timings are dependent on the user’s location.
Upon submitting this app on the Appstore, our application got rejected for the following reason:
Upon further review we found your application features do not require persistent location. Apps that declare support for location in the UIBackgroundModes key in your Info.plist file must have features that require persistent location.
Please can you suggest me how can I fetch the user’s current location for Watch application when the iOS app is in the background without using UIBackgroundModes key for location services.

Inno Setup: Shutdown service for custom page

I'm building an installer using Inno Setup where I need to convert some existing files if the application is already installed.
To do so I need to stop the applications service which works automatically for the install process. Is there a way to hook a page between the application shutdown and start routine? Or to postpone the application restart to a later time?
EDIT:
I also tried CheckForMutexes('MyAppMutex') to manually prompt the user to close the application, but the function always returns false.
EDIT2:
My current workarround uses the isProcessRunning script by jakoch to prompt the user to manually close the application. I would prefer a more automatic solution though.

The service cannot accept control messages at this time

I just stopped an Application Pool in IIS. When trying to start it, IIS complains that,
The service cannot accept control messages at this time. (Exception from HRESULT: 0x80080425).
What gives? Whence did this error come?
Looking at the Event Viewer > System shows these warnings:
A worker process '1456' serving application pool 'MyAppPool' failed to stop a listener channel for protocol 'http' in the allotted time. The data field contains the error number.
A process serving application pool 'MyAppPool' suffered a fatal communication error with the Windows Process Activation Service. The process id was '10592'. The data field contains the error number.
A process serving application pool 'MyAppPool' exceeded time limits during shut down. The process id was '10516'.
This resolved itself after about 5-minutes, at which point we tried to restart the website, and received:
The World Wide Web Publish Service (W3SVC) is stopped. Web sites cannot be started unless the World Wide Web Publishing Service (W3SVC) is running.
So, we started the W3SVC service, and then we could start our website.
This helped me: just wait about a minute or two.
Wait a few minutes, then retry your operation.
Ref: https://msdn.microsoft.com/en-us/library/ms833805.aspx
The error message could result due to the following reason:
The service associated with Credential Manager does not start.
Some files associated with the application have gone corrupt.
Please follow the steps mentioned below to resolve the issue:
Method 1:
Click on the “Start”
In the text box that reads “Search Program and Files” type “Services”
Right click on “Services” and select “Run as Administrator”
In the Services Window, look for Credential Manager Service and “Stop” it.
Restart the computer and “Start” the Credential Manager Service and set it to “Automatic”.
Restart the computer and it should work fine.
Method 2:
1. Run System File Checker. Refer to the link mentioned below for additional information:
http://support.microsoft.com/kb/929833
In my case, the VS debugger was attached to the w3wp process. After detaching the debugger, I was able to restart the Application Pool
I stopped the IIS Worker Process (in task manager), and then started the IIS again.
It worked.
I killed related w3wp.exe (on a friends' advise) at task manager and it worked.
Note: Use at your own risk. Be careful picking which one to kill.
Restarting the machine worked for me but not every time.
If you are really stuck on this then follow below steps
Open Task Manager
A window will open. Click on Details tab.
Search for the process name you wanted to restart/stop.
Select process, right click on it, select End task option.
A confirmation dialog box will appear. Click on End process button.
Now try to restart your service from Services.msc window.
I forgot I had mine attached to Visual Studio debugger. Be sure to disconnect from there, and then wait a moment. Otherwise killing the process viewing the PID from the Worker Processes functionality of IIS manager will work too.
Restarting the IIS windows service (World Wide Web Publishing Service) and then starting the application pool has worked for me. However, as the top answer suggests it may have just been the waiting that caused it to subsequently work.
I had this issue recently,
Problem statement:
Mine was a windows service that I run locally by attaching VS debugger. When I stop debugging and try to restart/stop the service (under services.msc) I used to get the mentioned error.
Solution:
Open up Task manager.
Search for the service (based on the exe name and not service name, for those that are different).
Kill the service.
On doing the above the service is stopped.
Being impatient, I created a new App Pool with the same settings and used that.
I kept having this problem whenever I tried to start an app pool more than once. Rather than rebooting, I simply run the Application Information Service. (Note: This service is set to run manually on my system, which may be the reason for the problem.) From its description, it seems obvious that it is somehow involved:
Facilitates the running of interactive applications with additional administrative privileges. If this service is stopped, users will be unable to launch applications with the additional administrative privileges they may require to perform desired user tasks.
Presumably, IIS manager (as well as most other processes running as an administrator) does not maintain admin privileges throughout the life of the process, but instead request admin rights from the Application Information service on a case-by-case basis.
Source: social.technech.microsoft.com

Stopping one process when debugging multiple processes in Visual Studio

I have a solution with 3 projects - a Xamarin iOS app, an Azure Mobile Services project and an Azure Cloud Service project.
I right-click the first project and choose Debug->Start new instance.
Then I do the same for the 2nd and 3rd projects.
At the end, the Processes list look like this:
Now I right click one of the processes and select Terminate Process.
I expect this to only stop the process I selected and that the other 2 processes will continue to run.
Instead, this causes the process to terminate and after a second or 2 the entire debug session stops and the other 2 processes stop also.

Resources