Overview
Features
Download
Documentation
Community
Add-Ons & Services

Is Anyone Running a TCPServer as a Windows Service?

A general discussion forum.

Is Anyone Running a TCPServer as a Windows Service?

Postby DougE » 22 Sep 2008, 15:56

Hi,

I'm trying to run a TCPServer based application as a Windows service and I'm trying to find someone that might have some tips about making this work.

I can run my server as a service now but the logging (to a file) doesn't work and I haven't figured out any way to debug it without the logging.

If you would be willing to help please get in touch.

Thanks,
Doug Miller
dmiller@identimetrics.net
DougE
 
Posts: 13
Joined: 15 Jul 2008, 17:44

Re: Is Anyone Running a TCPServer as a Windows Service?

Postby WITTROCK » 22 Sep 2008, 18:09

I'm not running on Windows, but In the past I have used Borland C++ builder to build a windows service. I know that because a service is run in the context of the SCM, you can't debug it as usual. The service must first be running, and then you must attach to the running process.

You don't mention what compiler and debugger you are using, but if it is Visual C++ then the following link may help: http://msdn.microsoft.com/en-us/library/7a50syb3(VS.80).aspx

I'm afraid I don't know about logging not working on a windows service. Maybe once you have the debugger working, it will give you some insight into the problem you are having with the logging.

-WITTROCK
WITTROCK
 
Posts: 10
Joined: 06 Dec 2007, 22:29
Location: United_States

Re: Is Anyone Running a TCPServer as a Windows Service?

Postby alex » 22 Sep 2008, 18:20

> I can run my server as a service now but the logging (to a file) doesn't work and I haven't figured out any way to debug it without the logging.

I'm running many windows service apps that have embedded TCP server and never had a problem logging. Your problem is not likely to be related to either TCPServer or windows service. Could be configuration or permissions issue.

Alex
alex
 
Posts: 1105
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Is Anyone Running a TCPServer as a Windows Service?

Postby guenter » 22 Sep 2008, 20:57

Maybe, since a service runs under another user account (SYSTEM, if I recall correctly), your service has no write permission to the directory where your log file should be located. Just guessing...

Another thing to check - if you're using a property file for configuration, then backslashes in file paths must be escaped. As in C:\Logs\MyApp.log
guenter
 
Posts: 1112
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Re: Is Anyone Running a TCPServer as a Windows Service?

Postby DougE » 26 Sep 2008, 16:19

Wittrock,

I haven't mastered this yet but thanks for the link!

Doug

> I'm not running on Windows, but In the past I have used Borland C++ builder to build a windows service. I know that because a service is run in the context of the SCM, you can't debug it as usual. The service must first be running, and then you must attach to the running process.
>
> You don't mention what compiler and debugger you are using, but if it is Visual C++ then the following link may help: http://msdn.microsoft.com/en-us/library/7a50syb3(VS.80).aspx
>
> I'm afraid I don't know about logging not working on a windows service. Maybe once you have the debugger working, it will give you some insight into the problem you are having with the logging.
>
> -WITTROCK
>
DougE
 
Posts: 13
Joined: 15 Jul 2008, 17:44


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron