473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Help With Windows Services

Hi All

I have a task that I'm thinking about attacking in two different ways
but don't know enough about Windows Services.

First:

We have a server application written in VB.net that acts as a
middleman between various Fortan DLL's (the calculation engines) and
various front end client applications (one in Java and two in
VB.net). The front ends check to see if the server application is
running when they need some calculations and if it's not running they
start it up. Simple enough and works great.

Well, now the powers that be have decided that the server application
should be a Windows Service (and always be running), rather than a
standalone executable.

I thought that I had correctly converted the project to a service. It
compiles and installs just fine. And it seems to run with no
problems. However, when I actually make a call to the service I keep
getting errors back (from Fortran) telling me that various
configuration files are missing (these are text files and binary files
containing engineering data needed by the Fortran code). They are in
the same location that they have always been (the same folder as the
windows service EXE), but for some reason now they can't be found,
where as before there was no issue. Having a difficult time
determining whether this is a Fortran or a VB.net problem, especially
since the debugging is trickier for Windows Services than just for
straight executables.

Is there a special location on the drive when all support files for
any Windows Service need to be located?

Second:

Another idea I had is rather than integrate all of the code from the
server application into a new Windows service, I'd possibly keep the
same executable and have the service just act as a wrapper, always
monitoring whether or not the server application executable is running
and restarting it whenever it stops (for whatever reason). This would
seem to be much simpler and would leave open the option of returning
to the old method should we decide that the windows service route
isn't for us (we all know that management tends to change their minds
often). I had originally pursued this path but was unsure how to do
this with only the service OnStart and OnStop methods available.

Thanks in advance for any assistance.

Nov 8 '07 #1
4 1352
On Nov 8, 7:26 am, ags5406 <my.spam.5...@gmail.comwrote:
Hi All

I have a task that I'm thinking about attacking in two different ways
but don't know enough about Windows Services.

First:

We have a server application written in VB.net that acts as a
middleman between various Fortan DLL's (the calculation engines) and
various front end client applications (one in Java and two in
VB.net). The front ends check to see if the server application is
running when they need some calculations and if it's not running they
start it up. Simple enough and works great.

Well, now the powers that be have decided that the server application
should be a Windows Service (and always be running), rather than a
standalone executable.

I thought that I had correctly converted the project to a service. It
compiles and installs just fine. And it seems to run with no
problems. However, when I actually make a call to the service I keep
getting errors back (from Fortran) telling me that various
configuration files are missing (these are text files and binary files
containing engineering data needed by the Fortran code). They are in
the same location that they have always been (the same folder as the
windows service EXE), but for some reason now they can't be found,
where as before there was no issue. Having a difficult time
determining whether this is a Fortran or a VB.net problem, especially
since the debugging is trickier for Windows Services than just for
straight executables.

Is there a special location on the drive when all support files for
any Windows Service need to be located?

Second:

Another idea I had is rather than integrate all of the code from the
server application into a new Windows service, I'd possibly keep the
same executable and have the service just act as a wrapper, always
monitoring whether or not the server application executable is running
and restarting it whenever it stops (for whatever reason). This would
seem to be much simpler and would leave open the option of returning
to the old method should we decide that the windows service route
isn't for us (we all know that management tends to change their minds
often). I had originally pursued this path but was unsure how to do
this with only the service OnStart and OnStop methods available.

Thanks in advance for any assistance.
Since all of your front end's are java and .net - have you considered
turning your server app into a web service?

--
Tom Shelton

Nov 8 '07 #2
On Nov 8, 9:02 am, Tom Shelton <tom_shel...@comcast.netwrote:
>
Since all of your front end's are java and .net - have you considered
turning your server app into a web service?

--
Tom Shelton
Have not. Know even less about web services (nothing actually). Does
that require a network connection?

Several of the clients are run on network computers. However, the
main (possibly most important) client runs on a laptop computer (or
other terminal) completely disconnected from any network in an
airborne vehicle. So the client, the server app, and the DLL's are
essentially in a vacuum on each machine.
Nov 8 '07 #3
On Nov 8, 8:42 am, ags5406 <my.spam.5...@gmail.comwrote:
On Nov 8, 9:02 am, Tom Shelton <tom_shel...@comcast.netwrote:
Since all of your front end's are java and .net - have you considered
turning your server app into a web service?
--
Tom Shelton

Have not. Know even less about web services (nothing actually). Does
that require a network connection?

Several of the clients are run on network computers. However, the
main (possibly most important) client runs on a laptop computer (or
other terminal) completely disconnected from any network in an
airborne vehicle. So the client, the server app, and the DLL's are
essentially in a vacuum on each machine.
The web service could still work... But you are probably better off
using a service. So the problem that your having with the service is
that it is not finding some of it's resources?

--
Tom Shelton

Nov 8 '07 #4
The web service could still work... But you are probably better off
using a service. So the problem that your having with the service is
that it is not finding some of it's resources?

--
Tom Shelton
Well oddly enough I've solved my problem. What seems to happen so
often is I struggle and struggle with a problem and then right after I
post here the answer dawns on me. It was actually pretty simple. I
went with method two as I described in my original message. It allows
me to preserve the original server application.
>From the OnStart method in the windows service I launched a separate
thread (so the OnStart method could actually complete its task). And
then within the thread I simply created an infinite loop to keep
checking the process list and to launch the server app if it is
missing from the process list.

Nov 8 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
9
by: Popoxinhxan | last post by:
Dear experts, i want to develop an client application that consume the google search web service. In my MainForm i have a method to retrieve all the search result e.g. GetGoogleResults(). Now i...
4
by: Jm | last post by:
I'm trying to set up ASP.NET on my Windows 2000 server w/ IIS 5 and MS ISA Server. Here's what I have done so far without any luck. Here's the results from the pages I've created...
1
by: Microsoft News | last post by:
I have a web server sitting on computer 1, (QA1). Out on the network on my main server I have a folder with a zip file in it. All I want is for the web services that are on the web server to pick...
13
by: Siegfried Heintze | last post by:
I refered the engineer at my hosting service to http://support.microsoft.com/default.aspx?scid=kb;en-us;825738 where he tried to follow the directions there. He said there was no such file:...
1
by: getobject | last post by:
I am building an ASP.Net site and wish to use a SharePoint to hold the information. I am trying to add an entry to a list using Sharepoint webservices and keep getting a SOAP exception. I have know...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Rambaldi | last post by:
Hi there, I can connect to the WebMethod from the WM6 emulator, but i cant connect from the device :S Shouldnt the device work as fine as the Emulator??? I change the web reference url to my...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Overview NOTE- This complete article on "Windows Autorun FAQs" applies theoretically to all Windows NT-based OSes till Windows Vista (and probably Vista's successors too)....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.