473,785 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help on Windows Service startup

Dear all,

I have build a windows service whcih read soime remote configuration in an
application file. That file path is pass as argument in the satrt parameter
of the service.

If I start the service without any config file related, it start fine but as
long as I ask for reading a configuration file it fail to start.

Error message displayed under event logger say that FileNotFound exception
but the config file is located at the same place where the service exe file
is.

What can be wrong.

My config file is pass to the service as follow :

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
RemotingConfigu ration.Configur e(args(0))
End Sub

Thnaks for help
regard
serge
Sep 27 '06 #1
1 1267
problem solved

"serge calderara" wrote:
Dear all,

I have build a windows service whcih read soime remote configuration in an
application file. That file path is pass as argument in the satrt parameter
of the service.

If I start the service without any config file related, it start fine but as
long as I ask for reading a configuration file it fail to start.

Error message displayed under event logger say that FileNotFound exception
but the config file is located at the same place where the service exe file
is.

What can be wrong.

My config file is pass to the service as follow :

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
RemotingConfigu ration.Configur e(args(0))
End Sub

Thnaks for help
regard
serge
Sep 27 '06 #2

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

Similar topics

0
2891
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).
1
1349
by: tmagney | last post by:
I have created a windows service in VB.Net called 'Import Agent'. In the event log, when the service starts, the source is listed as Service1. Everywhere else that matters, like the MMC, my project and solution names, and the name of my service class all have the correct name. I changed the startup object in my project's properties from Service1 to ImportAgent. I even went through the registry and changed every reference from Service1...
3
2198
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My issue is simply getting timers to work. I have a DatabaseManager.DataManagerFacade which contains a timer. Every 6 seconds it updates stock data using an online webservice. I wrote have 2 possible startup projects to make the service work. One...
5
1329
by: Mark Rae | last post by:
Hi, I'm looking for advice concerning what to do if a Windows service does not find a "viable" working environment at startup. E.g. I have a Windows service which does the following: 1) connects to a remote FTP site and looks for certain files which it downloads to a fileserver if it finds them;
3
14952
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim swLog As StreamWriter = File.CreateText("C:\myLog.txt") swLog.WriteLine("My Windows Service has just started.") swLog.Close() : swLog.Flush() End Sub
16
2540
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client uses IE to talk with a server. The user on the client (IE) sees an ASP net page containing a TextBox. He can write some text in this text box and push a submit button.
2
8724
by: Cubaman | last post by:
Hello everybody. I'm currently developing a windows service. In OnStart a launch two threads that carry on some work while the service is running. My problem comes from the fact that once the service is installed, it just time out at system startup and don't start. But i'm able to start it manually once i'm logged in. I read in a page something about signed assemblyes, saying that clr have to verify the executable at startup, causing the...
4
4184
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to check to see if the status is in stopped or running mode. But that doesn't tell me if it is actually running. I need to know this so that if it happens I can programmatically start the same service on another machine.
2
9736
by: rqcoder | last post by:
Is there a way to change a Service's startup type somewhere in the .net framework? I've been messing around with the System.ServiceProcess namespace which allows me to start, stop and pause services however if the service's startup type is set to "Disabled" there is no way for me to change it to Automatic or Manual... attempting to start a disabled service results in exceptions (i.e. ServiceController.Start).
1
6415
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... After I installed my .net windows service, I tried to control some of the behavior with the Start Parameters: in the services control parameter. I can put a value in the box but for some reason it never gets saved (I open the properties right after, and the box is empty). How does one persist a value in the Start Parameters box for a service? Thanks
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.