I just tried MP2-Server as a service for the first time and just wanted to post my first observations:
First of all, for me as an old-school guy it was new that you can't use regsvr32 for .net-services. I didn't build a full installer but just compiled the dev branch. As a result, I had to use "installutil.exe" to get the service installed. The location of this utility, however, was not in my path variable and it took me some time to find it in C:\Windows\Microsoft.NET\Framework\v4.0.30319. Maybe this should be documented for .net-newbies like me
Second observation was that when I started the service from the taskmanager, it started and then it terminated immediately without any error message. There was also no single line in the log files and no error log at all. The windows system log just showed "service terminated". When I started the service in applications mode ("-c" commandline parameter), it started without problems. The reason for the service terminating immediately was that I still had a lot of settings and files in C:\ProgramData\Team MediaPortal\MP2-Server from my old installations, which the MP2-server apparently didn't like (although I don't understand, why MP2-Server started as an application without problems).
After deleting this directory completely, the service started without problems. While having old files in this directory may be a valid reason for the service terminating, it would be helpful if there was some kind of hint in the logfiles why there is a problem for the service.
Lastly, my MP2-client did not connect automatically to the MP2-server, when it was started as service. The same MP2-Server as service seems to be recognized as a "different MP2-server" than the same server started as an application. After detaching from the MP2-server and re-attaching again, it worked.
Besides these observations, very good progress guys! I hope I will have some more time to test in a couple of weeks...
cheers,
Michael
First of all, for me as an old-school guy it was new that you can't use regsvr32 for .net-services. I didn't build a full installer but just compiled the dev branch. As a result, I had to use "installutil.exe" to get the service installed. The location of this utility, however, was not in my path variable and it took me some time to find it in C:\Windows\Microsoft.NET\Framework\v4.0.30319. Maybe this should be documented for .net-newbies like me
Second observation was that when I started the service from the taskmanager, it started and then it terminated immediately without any error message. There was also no single line in the log files and no error log at all. The windows system log just showed "service terminated". When I started the service in applications mode ("-c" commandline parameter), it started without problems. The reason for the service terminating immediately was that I still had a lot of settings and files in C:\ProgramData\Team MediaPortal\MP2-Server from my old installations, which the MP2-server apparently didn't like (although I don't understand, why MP2-Server started as an application without problems).
After deleting this directory completely, the service started without problems. While having old files in this directory may be a valid reason for the service terminating, it would be helpful if there was some kind of hint in the logfiles why there is a problem for the service.
Lastly, my MP2-client did not connect automatically to the MP2-server, when it was started as service. The same MP2-Server as service seems to be recognized as a "different MP2-server" than the same server started as an application. After detaching from the MP2-server and re-attaching again, it worked.
Besides these observations, very good progress guys! I hope I will have some more time to test in a couple of weeks...
cheers,
Michael