I have an app that runs as a service, and I'd like it to be able to check a URL to see if a new version is available, and if so to download and install it. I can manually hack something together, but would be great if I could create an MSI package to update the service, and any other components that are part of my distribution. I'd also like it to be done without any UI, so the user is unaware of the update.
Are there any good solutions for this?
This could be tricky depending on what your update might want to do.
If you intend on deleting and re-installing the service, this may require a reboot, which will certainly be visible to the user.
In order to replace the components of the service, the service has to be stopped first. If your service itself is detecting the update availability, it may have to kick off another process to stop the service, run the installer/updater and then restart the service.
Try installer.codeeffects.com. It has this feature.
You could try MEF (http://www.codeplex.com/MEF) and use
[Import("http://someUrl/someComponent")]
public ISomeComponent SomeService;
Its not actually an auto update, but the service could be always up to date. I am not sure if it works.. its just an idea :-)
Related
Is start (Dart server side framework) auto-refresh when one of our source code changed (just like PHP)?
Is bulls_eye, bloodless and express too?
or if they are not, is there any Dart server side framework that able to do that (edit code, then test on the browser, without needing to restart the dart/server program)?
Currently this is not yet possible in Dart. If you change the code you have to restart the app.
I wouldn't expect this to work anytime soon.
A main feature to make this possible is to manipulate the code at runtime. This is planned but as far as I know not yet started.
EDIT
The above mentioned feature is necessary when you want code to be updated without loosing the current state of the application but that is usually not so important on the server because it should be (mostly) stateless anyway.
In Dart there's no need to restart the server app when only the client part changes.
If you really just want to restart the entire server when the code changes you should be able to do that by yourself. Create a console app that loads the server app into an isolate (spawnUri) and watch the source directory for file changes. In the case of a file change shutdown the server-app-isolate and create a new one.
Whenever a specific Windows service fails I want to run a program I've created myself. However, I simply can't find a way to make it fail on purpose, so that I can actually test that everything works correctly.
Note that the service in question is not something I've written myself, so I can't make it fail programmatically from inside the code. I wouldn't, however, mind writing a program that can make a service fail.
Of course I would prefer just having a "Make service fail" button somewhere in services.msc ... ;)
The server I'm doing this on is running Windows Server 2012.
If you don't want to use command line :
As an admin open the Windows Task Manager, in the Services tab find the service you want to test. Right click the service and click on Go to process. The selected process (if any) is the one corresponding to your service. Kill this process to simulate a service failure.
Be aware that killing a process this way can lead to problems.
Define "fail". If you want the process to end, just use pskill or a similar tool that can terminate a process elevated (as an admin).
I have a WiX installer that runs a program that downloads the latest version of my code and installs three windows services. I have a custom action runs another program that shuts down and uninstalls the services during uninstallation, after InstallInitialize. The uninstaller also deletes all files and directories that get downloaded. However, when I RmeoveFile actions to delete the files, it prompts the user to shut down the services, since it must detect the conflict. I would like to avoid this, since my custom action does that anyway.
So I need a way to do either of the following:
Run the custom action (and thus my program that shuts down the services) before the installer does whatever check it does that tells it that the services need to be shut down.
Tell the installer to automatically shut down the services without prompting the user to do so. Unfortunately, the install package doesn't include the services, they get downloaded by my app, so I"m not sure how I"d do this.
Can either of these things be done?
The easy fix is to get rid of the custom action. Windows Installer can be told to manage services that it didn't create. Just author ServiceControl elements like this:
<Component...
<ServiceControl Id="sc1" Name="fooservice" Remove="uninstall" Stop="uninstall"/>
</Component>
I'm currently developing three workflows that are supposed to handle the status of items in different lists.
Each Workflow is attached to a separate list.
When I'm deploying and debugging in my development Environment, everything works fine.
Except for the case, when an item is created via an incoming mail.
I already figured out, that I have to restart some services and then it'll work, but I'm still not sure wich of the services is caching the workflow.
Afterwards I build a .wsp file which I deploy on a server.
Each time I deploy the solution, I do a retract and delete solution first.
After deployment I'll recreate the workflows on the lists
It seems to me that this has no effect. An older version of the workflow is still triggered, if I create a new instance in the list.
I already restarted the whole server and still no result.
Has anyone an idea what else I could try in order to get this working?
Thanks in advance.
If Timer Service is the one that calls your code, then restart Windows SharePoint Services Timer (OWSTIMER.EXE).
When workflow waits on something, it gets serialized (hydrated). When event happens, OWSTIMER.EXE deserializes (dehydrates) and continues workflow execution.
So timer is the one that wakes workflow up.
So this problem kind of resolved itself.
I was reading an article on Kirk Evanns Blog on an issue with the development of workflows in VS2008 for WSS.
I had not realized that I still had an illeagle reference in my Project properties.
I removed the reference. The second thing I tried was deploying with -upgradesolution rather than doing a retract-delete-add-deploy...
I don't know which of both did the trick, but I can finally see the new workflows kicking in.
Thanks for your help.
My setup project installs a windows service. Right now this action is in the Install category. Would the commit category be a better location for it?
I've added a custom action to remove the service in the Uninstall category, but when I run the uninstall, the user is prompted to shut down the service. As the user should never really know that the service exists, I'd rather this never pops up, but rather stops the service on its own and simply uninstalls this. I can't seem to find a setting for that. How might I accomplish it?
Should I have anything in the rollback section? I added the same custom action for the install/uninstall, figuring it would be smart enough to uninstall the service if the rollback occurs after the service was installed. Is this correct? Would it be moot if I installed on commit instead?