Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

which Windows service ensures network connectivity?

I am doing a windows service that must have network connectivity when it starts. Code is in c# and I set the service dependent from others with

serviceInstaller.ServicesDependedOn = new string[] { "Tcpip" };

I can see dependency correctly entered on windows service manager, but after reboot my service fails to start because it can't connect to network, after host gets an IP the service starts correctly.

I tried with "Tcpip" and "Dhcp" services. Which service should it depend on?

service needs network connectivity since its purpose is to mount a unit through ssh

thanks!

like image 739
Lluís Avatar asked Jun 01 '12 18:06

Lluís


People also ask

What is Network Connection Service?

In computer networking, a network service is an application running at the network application layer and above, that provides data storage, manipulation, presentation, communication or other capability which is often implemented using a client–server or peer-to-peer architecture based on application layer network ...

How do I check Windows connectivity?

Select the Start button, then type settings. Select Settings > Network & internet. The status of your network connection will appear at the top. Windows 10 lets you quickly check your network connection status.


2 Answers

We have been making our services, that depend on the network begin started, dependent on the "Server" service. Its actual name is "LanmanServer". This has been working ok for us. If you look at its description it states:

Supports file, print, and named-pipe sharing over the network for this computer. If this service is stopped, these functions will be unavailable. If this service is disabled, any services that explicitly depend on it will fail to start.

Our thinking is that if the computer is ready to do thoes functions, then the network has to be started.

like image 128
user957902 Avatar answered Sep 29 '22 00:09

user957902


I use "Tcpip", "Dhcp", "Dnscache". Works OK for me.

like image 20
Savis Avatar answered Sep 29 '22 00:09

Savis