Windows Services does not show up in the service list - c#

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.

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.

Unable to consume web service

I published a simple Hello World web service in an ASP.Net web service project.I closed this project and opened another console based project to consume this web service. The problem is I cannot discover this web service to add reference.When I paste the url, I get the following error
There was an error downloading 'http://localhost:65436/Service1.asmx/_vti_bin/ListData.svc/$metadata'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:65436
I am using Visual Studio Ultimate 2013, I don't have IIS server installed.
UPDATE- : I created a new Console based project in the existing solution and it works fine.But the problem is how do I run this console project,when I click the debug button, it deploys it on browser.I simply printed the string output returned by web method,I need to see this output on console.
I closed this project and opened another console based project to consume this web service. The problem is I cannot discover this web service to add reference.
Because the web service is not running. Web service references can only be generated when the metadata is available.
You can either:
Run two instances of Visual Studio, one for the web service and one for the client
Put a service and client project in one solution.
Also, you shouldn't use ASMX for new development. Take a look at WCF and WebAPI.
Sometimes it happens to me too. I press F5 to start debugging the web service, immediately stop debugging, and then try to update the web reference again. Usually it helps.
you can deploy the web service on IIS then consume it in console application.

How to deploy web service along with a windows application installation?

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.

Add windows service in a Class Library(Output Type)

I have created a windows service and Installer in Windows application. It works well.
For some reasons I need to create that service and Installer in another Class Library. But For this case after installing service the Service is not appearing in the
Services list. Help on this!!

Categories