473,387 Members | 1,582 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,387 software developers and data experts.

Converted app to a Windows Service


I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folder

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.

The application is started as a Windows service, is enabled, and starts
& ends fine. I set the Log On account to be one that has local
administrator rights on the application server (Server1), and also has
local administrator rights on the data source (Server2).

How do you give a Windows Service (ie \\Server1\Myservice)
read/write/delete permissions in a folder on another server (i.e.
\\Server2\Mydata)?

If I copy the file over to the local app server (Server1), into a local
folder, the application will run fine. However, that's an extra step I
don't really want to add to running this job each day.

Any help appreciated
BC

Apr 19 '07 #1
4 1312
On Apr 19, 10:39 am, Blasting Cap <goo...@christian.netwrote:
I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folder

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?

Apr 19 '07 #2

Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folder as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.


Chris Dunaway wrote:
On Apr 19, 10:39 am, Blasting Cap <goo...@christian.netwrote:
>I have an application that was converted from a VB application to a
windows service.

I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.

The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folder

I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.

However, when I put it in the application, it won't read it in.

What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
Apr 19 '07 #3
On Apr 19, 11:15 am, Blasting Cap <goo...@christian.netwrote:
Chris Dunaway wrote:
On Apr 19, 10:39 am, Blasting Cap <goo...@christian.netwrote:
I have an application that was converted from a VB application to a
windows service.
I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.
The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folder
I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.
However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folder as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.
Are you using exception handling in your code? Are you swallowing the
exceptions if any are generated?

Chris

Apr 19 '07 #4
The program was swallowing the exceptions. It had a configuration file
with it (XML) that provided the source & destination folders - the
problem was leaving a slash off one of those configuration lines. That,
and having it log in as a local service. Once I changed it to an
account that had administrator rights on BOTH servers, and corrected the
syntax error on the config file, it ran fine this morning.

Thanks for the help.



Chris Dunaway wrote:
On Apr 19, 11:15 am, Blasting Cap <goo...@christian.netwrote:
>Chris Dunaway wrote:
>>On Apr 19, 10:39 am, Blasting Cap <goo...@christian.netwrote:
I have an application that was converted from a VB application to a
windows service.
I pass in parameters in a file that tells the application where to pull
a file from & read it and put it into a web page.
The application works fine when the input & output locations are local
on the server the app is on. However, the location for one of the files
is going to change to be on another server, that'll have to be set up
like \\Server2\folder
I can copy that out & put it in windows explorer, and it goes to the
folder it's supposed to.
However, when I put it in the application, it won't read it in.
What do you mean when you say "it won't read it in"? Are you getting
an exception? An error message? Incorrect data result?
>Right now, I have it set to put out info into the event log, each time
it checks for the file. If it's local, I'll see events out there, no
problem.

If I specify \\Server2\folder as it's input, versus
[Server1]D:\DailyInput, it just sits there - nothing at all written into
the event log. It appears not to run, unless the source for it is local.

Are you using exception handling in your code? Are you swallowing the
exceptions if any are generated?

Chris
Apr 20 '07 #5

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

Similar topics

9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
5
by: Blasting Cap | last post by:
I have a VB6 program that runs as an app, that I want to both convert it to vb.net, and run it as a service on the server. I have been able to create the service, and what I did was to open the...
4
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...
0
by: Chakravarthy | last post by:
We have a windows application which passes a dataset to a web service which then hands it to the business and data layer. When we have a date time column in the dataset, the web service seems to...
2
by: Chris Paxton | last post by:
I have a fairly basic VB.NET application that I converted from VS2003 to VS2005 and now it crashed the VS2005 IDE pretty regularly while trying to use the form designer. I've removed any 3rd...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.