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.
Related
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
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
Is it possible to configure Microsoft's Application Insights to monitor a Windows service?
I have a VM running in Azure on which the web service is hosted. Which version of the monitoring agent to I need to install and what steps need to be undertaken in order to allow monitoring data do be seen in the dashboard?
I'd also love to see this capability, but it seems from this MSDN page that it's not possible. I hope they expand the service's capabilities later on as it would be great to see a product on the level of AppDynamics or New Relic from MS.
Performance and exception monitoring with Application Insights
You can monitor performance in:
A .NET web service. You have to have administrative access to the server machine. You don’t have to alter the code of the web service.
A .NET service running as a web role on Microsoft Azure Cloud Services. You have to have access to the code. You run the Application Insights tool on your development machine, then rebuild and redeploy the service.
A Java web service. You download the agent to your server machine, update the configuration files, and restart your web service.
Here is an Application Insights Telemetry SDK for services:
http://www.nuget.org/packages/Microsoft.ApplicationInsights.Telemetry.Services/0.7.1
It can be manually configured. Check this out - https://learn.microsoft.com/en-us/azure/application-insights/app-insights-windows-services
Basically,
- create a ASP.NET app on the portal and obtain InstrumentationKey
- Install the nuget package "Microsoft.ApplicationInsights.WindowsServer"
- Add the InstrumentationKey in config file or code.
I have a multi tier windows application. one of the layers is implemented using web services and the UI layer communicate with this layer. I want to make an installation package for the application and i need the installation package to deploy the web services to the local machine's IIS during the installation, so the user doesn't need to go to IIS and configure it manually.
You can package your Web Service (or any web application) as a Web Deploy Package.
See this link on how to do this from Visual Studio: https://www.tutlane.com/tutorial/aspnet-mvc/asp-net-mvc-publish-with-web-deploy-package
Such a package also comes with a .cmd file that could be run by your setup. Read the deploy-readme.txt alongside it to learn more.
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.