services setup project showing Error - service

I create One Windows services to scheduling SQL backup,
Its runs perfectly when i install it by visual studio command prompt, installutil services.exe,
Now i need to make it setup so, i can give this services to my client also,
I found http://support.microsoft.com/kb/816169 this link very userful
i create setup file, and it also install services,
but when i start services by right click on service,
it start perfectly in my PC but in other Pc its shows error
kindly help me to create setup file for services

I think you see that message when the service is started by the system but stops quickly without completing the protocol message/event exchange. Your service is starting and then just finishing, so you need to figure out what it's doing, even if it's just "On Exception go to end of program".

Related

Any Idea how to create a windows application and its windows service? Like antivirus. .NET

I need to create a window application that runs through a service as well as the antivirus that have their service and application, I need to send error messages to the user, I have the service but I do not know how to send error messages. I do not know how to create antivirus, if someone has any idea how to do that, I'll be grateful
Not sure if this will help and how it will help but posting this as answer to give a direction for your searches.Google - creating windows application as service
Above google search gives ways to setup a program as service
How to Run Any Program as a Background Service in Windows
Walkthrough: Creating a Windows Service Application in the Component Designer

Cannot debug project after upgrading to Service Fabric SDK v2.3.301

Recently upgraded to Service Fabric SDK v2.3.301, but for some reason my project got corrupted. I cannot debug the project, I get the following error: "A project with an Output Type of Class Library cannot be started."
It seems that the solution now fails to recognize the Service Fabric App. Yet I am able to deploy to my local cluster.
Anyone had similar issues while upgrading to the new SDK?
Thanks
PS Just in case, the service fabric app is the already set as startup project :o)
We have been using Service Fabric to develop a product for about a year with various versions of the SDK and I see this frequently. It happens both when hitting F5 with the SF Application as the sole startup project and even when right-clicking the SF Application and choosing "Debug -> Start New Instance".
Sometimes I have to try several times before it finally works. Other developers in our team see this as well, going all the way back to v2.0.
One thing that seems to make it happen less frequently is not touching anything on your computer after launching the project. Don't click anything else. Don't select another window. Let go of the mouse. Don't touch the keyboard.
Something I've started doing on the advice of a colleague is choosing "Debug -> Start Without Debugging", then attaching to the process if I want to debug it. I've had better luck with this approach in general - including not getting the "A project with an Output Type of Class Library cannot be started" issue.
I hope that helps.
I have had the same issue a couple of times. I have not been able to identify the source. But I have solved it with the following actions:
Close all Visual Studio windows.
Restart the Service Fabric service: Type services.msc in the windows run tool. Find Microsoft Service Fabric Host Service. Right Click + Restart.
Reset the local cluster: Look at the Service Fabric Local Cluster Manager Icon in the notification area in the right side of the task bar. Right Click + Reset Local Cluster.
Open the problematic solution in Visual Studio.
Clean and Rebuild solution.
Finally run your solution (press F5).
Hope this helps.
The error indicates that the service fabric application project (*.sfproj) is not set as start up project. Please try to change the start up project as some other project and again change it back to service fabric application project and see if that resolves the issue.

Restart Eclipse application

How can I restart an application in Eclipse through a socket call?
I built an error diagnosis app which can checks what code should be changed to handle the error, but after the change I have to restart the app again. I already have developed a plugin for Eclipse which would take care of this, but I am not sure on how to restart the app.
1.) Is there an internal Eclipse command to restart the app?
2.) Do I have to use a command shell (which I wouldn't prefer)?
Hope someone can help me or give me some guidance. Also I know that there is a possibility to restart an app for debugging, but I want to run the app without debugging.
If you mean you have an Eclipse 3.x style RCP application and you want to restart the RCP from an Eclipse plug-in then you just do:
PlatformUI.getWorkbench().restart(true);
which restarts the RCP using the current workspace.
For an e4 RCP you do:
#Inject
IWorkbench workbench;
workbench.restart();
#greg-449: Thanks for your respond, but what I am trying to achieve is a bit more complex. Consider the following, I have a service that runs on another machine in my company network. It turned out something wrong is going with this service. So you can connect with with a remote debugger to the server and can check with the source code, that you have on your local machine, what is going on. I would say the classic Remote Debugging in Java.
But when you have fixed the error in the code you also have to restart the service on this other machine somewhere in the network. The question is how to do this? By a shell command which gives you the instances on this machine where the service is running or is there some other possibility?
Hope this helps more to understand the problem.

Is this a practical use of a service?

I need to run an application which processes hooks in background. The problem is that I have to start it automatically on systemstart as administrator. I've tried to use the windows task scheduler but on some systems it does not start the program as administrator which causes strange behaviours.
I've never written an windows service but would that be a solution to create windows service? And if yes: Does it start automatically as administrator on systemstart? How can i communicate with the service from an configuration program? And as last question: If I am right, I need to install a service through an installer like a msi-package. How would you create such a msi-package. Visual Studio 2012 does not support that anymore.
It would be very nice if someone could help me. Sorry for my bad English but I am giving my best. If you don't understand some parts of my question, just ask me.
1) Yes, this sounds a lot like you should write a service.
2) If you configure it so, by default they start with a special service account.
3) You can find a lot of good information about communicating with a service here: How to communicate with a windows service from an application that interacts with the desktop?
4) You don't have to. Do you use C# for example? You can then make use of a nice library called TopShelf to write your service.

Wix: The service cannot be started during installation

I'm having a problem with Wix Service as the service cannot be started during install progress. It throws the error:
Error 1053: The service did not respond to the start or control request in a timely fashion
I've tried with both [WIX_ACCOUNT_LOCALSYSTEM] and [WIX_ACCOUNT_LOCALSERVICE] but no one of them work.
But there is weird here as I have an installer which using ClickOne, it includes the same service component as the one I have been using in Wix. The ClickOne installs service just fine (using InstallUtil.exe), so it proves the account has right to start a service.
Then, I uninstall the software (installed by ClickOne), and running the Wix installer again, the service starts well now. I don't know the reason why?
I'd like to put some flows for more clearly:
1- On a fresh machine
2- Running Wix software installer --> the service cannot be started and throwing error message --> Cancel install
3- Running ClickOne software installer --> service starts well --> Uninstalling software
4- Running Wix software installer --> service starts well
Also note that, I've tried 2 times on 2 fresh machines but it's the same. Anyone can shed some light on this weird behavior? Or anything I should verify against?
Thanks in advance,
Thank you #Stephen Connolly, #Alexey Ivanov, #Cosmin Pirvu for your comments.
I'd like to add your comments above as the answer.
Using CheckAsm, a great tool to verify the assembly dependencies
Looking at the log information in Event Viewer for anything could stop the service starting (i.e. timeout, services dependency ...)
Verifying all stuffs would be needed for service operations. They should be available once installation completed (i.e. configuration, registry, working folder ...)
If the installer is installing files to the GAC using the Windows Installer tables, the dependencies won't be available when the installer runs the StartServices action