Sticky foreground service fails to restart with a “process is bad” error

For your vanilla version of your service, consider followings: 1- uninstall your app 2- reboot your device 3- reinstall your vanilla service version to just logging. It should work. For your foreground service consider using stopSelf or stopService methods and not stopForegroundService method. stopForegroundService just stop the service from being a foreground. It does not … Read more

“Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++.” After start a background service and closes the app

From the plugin package developer perspective: Since you are using a package that is causing this, I’ll mention that I was causing the same issue in my package. In my case, I was using the wrong (or old) method channel. I had saved an instance of a method channel from when the service (broadcast receiver) … Read more

Error updating service reference

I’ve had the same issue after updating to VS2013 Update 2. I’ve solved the issue by temporarily cutting the whole system.serviceModel section out of web.config, pasting it somewhere else like Notepad. Then, I’ve saved the web.config without the service model section. Then, I was able to update the service reference successfully. After updating the service … Read more

Using Process.Start() to start a process as a different user from within a Windows Service

I seem to have a working implementation (Works On My Machine(TM)) for the following scenarios: Batch File, .NET Console Assembly, .NET Windows Forms application. Here’s how: I have a windows service running as the Administrator user. I add the following policies to the Administrator user: Log on as a service Act as part of the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)