?
Solved

Run executable are Web Server in the background

Posted on 2003-11-17
7
Medium Priority
?
211 Views
Last Modified: 2010-04-20
Hi,

I have made a client server application in which the server accepts connection from the client on some specific port. Now i have to put this code on a Web Sever. Is there a way i can run the server.exe on the Web server at all times / in the background.

I would also want to know how to stop the exe and run it again.

I will be very grateful if anyone could help me with it.

Ahsan.
0
Comment
Question by:Shapak
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:fz2hqs
ID: 9769844
You need to get the .exe running as a service or it will not survive the logoff. You have a couple of choices

1. Rewrite (a slight rewrite) so that the .exe is a service in its own right using ntsvc.ocx (Windows NT Service Control)
2. Get the Windows 2000 resource kit and follow http://support.microsoft.com/?kbid=137890 (I am assuming you are using win 2000?)

The resource kit I think may cost a little - not too sure
0
 

Author Comment

by:Shapak
ID: 9776707
Hi,
Thanx for the help. Plz forgive me for my silliy question as i am new to this thing. So here goes another... How will i put the service on the webserver? Like i have the .exe running in the script to accept connection on some socket. Now how will it start running to accept connection.
Ahsan.
0
 
LVL 9

Expert Comment

by:fz2hqs
ID: 9777173
The service will be part of teh operating system. If you go into Control Panel > Administrative Tools > Services you will see all the services there, yours should appear there eventually. How you get your web site to access the service will depend on what that web site and service do, you need to give more details about both
0
 

Author Comment

by:Shapak
ID: 9777775
No no my website won't be accessing the service ... the service is to run on the webserver and my application will connect to the server through that service. Coz the service will be listening for socket connections and my application will make a socket connection. I hope i am making my self clear. I think i can't seem to convey the message...

Ahsan.
0
 
LVL 9

Accepted Solution

by:
fz2hqs earned 180 total points
ID: 9777840
Sorry my fault, answering another question elsewhere and got confused.

-You executable will be running as a service.
-IIS itself is a service
-IIS accepts connections

So provided that you coding is ok then you should be able to connect
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question