Converted app to a Windows Service

B

Blasting Cap

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
 
C

Chris Dunaway

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?
 
B

Blasting Cap

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.
 
C

Chris Dunaway

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
 
B

Blasting Cap

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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top