Link to home
Start Free TrialLog in
Avatar of UCS_Staff
UCS_Staff

asked on

VB6 windows service not able to listen to local TCP port on Server 2008

I have a legacy VB6 application that can run as a service or as a desktop application.  It opens a local TCP port and listnens for a connection from a remote client.  We recently migrated our server to Windows Server 2008.  We also put all the firewall rules in Windows Firewall (both allowing the application on any port and all connection to the local port desired) that we had in Windows Server 2003.  

The application, when running as a desktop app, opens the local TCP port and works perfectly.  However, when we try to run it as a service, it fails to open the local TCP port (the remote client fails to connect and we can't see the port as LISTENING when we run a NETSTAT).  We've tried setting the Service to run as various accounts (a domain account, a local account, and Local System), but still can't get it open the port.

What else do I need to do in order to get it to listen on the port?
ASKER CERTIFIED SOLUTION
Avatar of OklahomaDave
OklahomaDave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of OklahomaDave
OklahomaDave

P.S. I would also make sure that any dependent libraries required by the application/service can be accessed from its host location. You might also run a copy of ProcessMonitor as you start the service to see if there are any file access failures, eg file not found or access denied.

Plus check that al files and folders needed by the app are accessible to the account you use for the service.  As a test, you could eliminate possible firewall problems by temporarily turning it off and see if that makes a difference.  Also try the domain administrator as the service acct to see if that identifies permission problems.

Avatar of UCS_Staff

ASKER

OklahomaDave, Godd idea. I'll have to get with my company's dev team to see if they can add file logging.  I'm not sure how long it will take them to get it added though.

kbirecki, thanks for the ideas.  Unfortunately we've already tried them.  I've run the service as a domain and local admin as well as having all firewall (Windows and McAfee) disabled.  

Anything other thoughts?
Have you tried running the app as a service on something other than Server 2008?  Maybe win xp or win 7?  Win 7 would be closest to server 2008, but win xp would be easier to test the app functioning as a service - fewer security restrictions to deal with.
You could also run something like Nirsoft's OpenFileView to see that it is running as expected.  Running and responding though are two  different things.  Otherwise, oklahonadave's suggestions  seem like the next best step to see if the ports are actually being opened.
They didn't give me the solution, but they provided the means for me to find the solution.