I am currently working on visual studio C# to make a windows service.
I exported the project as "Release" "Any Core" and tried it on my computer, and it worked fine using :
I then copied it to my virtual machine (itself on a server that I connect to using distant desktop)
when doing the same commands on the virtual machine it tells me
the service is not responding to the control function
error code 2186
when opening the services maintenance window and manually starting it I get
the service did not respond to the start or control request in a timely fashion
error code 1053
The two errors are different, but what's crazy is that it works on my computer just fine...
What I've tested / checked:
trying to open a file at a location that do not exist apparently do weard stuff on windows :
the error come from here:
string path = "C:/myDocs/myService.exe";
if (!File.Exists(path))
{
using (FileStream fs = File.Create(path))
{
}
}