How to install windows service using windows app? - c#

I am pretty new to windows service and I have three projects in my solution:windows app,windows service and a setup and deployment project for the windows service. When the windows app takes an input,I would want the service to start running and perform its own task. However, I do not know how I can install the windows service while I`m still running the windows app. Can this be done by installing windows service programatically via the app? Any help would be highly appreciated

Related

How to create windows service application which will be automatically added to Windows services?

I created in VS windows service application (I used this tutorial https://learn.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer) and I used developer command prompt and installutil to install this application to Windows Service. How to create windows service application in VS which will be automatically added to Windows services (without using developer command pormpt)? Sorry for my bad English.
How to create windows service application in VS which will be automatically added to Windows services (without using developer command pormpt)?
Short answer, you can't.
It requires admin rights, which by default VS is not running in
Automatically deploying services is a bit of a security risk
Deployment can sometimes fail if the service is already running

WCF Application hosted service not appearing in Service Manager

Simple question really.
I have an application hosted WCF Service running on my server. This Service is in it's early stages of development. I want it to be "self healing".
When I run the service (by double clicking the .exe to run the console application which creates it) I'm not seeing the service appears under Services in either Task Manager or the typical Windows Service Manager.
Am I missing something?
What's the best approach to make this self-healing (restart on crash).
Thanks
You need to use a project type of Windows Service In Visual Studio and install the built exe file as a windows service in order to see it in Service panel.
Windows services have to be built as such from the start. You cannot take just any executable and install it as a windows service.
More information on MSDN: Introduction to Windows Service Applications.

How to install a windows service from a Windows 8 store app?

I have a windows store app "MyApp" in place. The app reads from a file "MyFile" that is written by a windows service "Myservice". I want to install and start the service when the app is first installed in the system. Is there a way to do that?
I thought of a way around where both the app and the service can be packaged as an exe and can be installed together from a single "mysetup.exe" but did not get any ways to do that too.
Any help in this regard will be appreciated.
P.S: I am using C# to code.

Mvc3 application to windowazure

I want to convert my MVC - 3 project to WindowAzure project. I downloaded SDK for VWD express 2010. Can anybody please guide to do this?
This should help you: Migrating an Existing ASP.NET App to run on Windows Azure
This TechEd 2010 Presentation on Using Microsoft Visual Studio 2010 to Build Applications That Run on Windows Azure by Jim Nakashima should get you going
To start with, you don't need to make any changes in your MVC application to move to Windows Azure. Once you have Azure SDK (June 2012) Installed, you will have an option with your Solution properties as "Add Windows Azure Cloud Service Project" to move your MVCx application to Windows Azure. There will not be any change to your main application, but this way your application will be part of Windows Azure Application and run as a Web Role there.
Now if your Azure Application is set as Startup project and if you run your application, this will launch your application in Windows Azure Emulator so you can test your MVCx application in Windows Azure Emulator.
Finally you would need to make necessary code changes (i.e. Database connection etc) to successfully run your application as Windows Azure Cloud Service in cloud. This is all depend on what kind of your application is and how you would want to run your application in cloud.

Windows Services does not show up in the service list

I have to create a service in .NET 1.1 and to install that service using the setup project. I successfully installed the service but it didn't show up in the service list.
I had a similar problem once and I asked this question: C#: Running and Debugging a Windows Service
The problem was that I didn't add an Service Installer to the Service. Try adding a Service Installer to your service and your service should appear in the services.msc list.

Categories