Home All Groups Group Topic Archive Search About

Windows Service Cannot Move Files

Author
24 Jul 2006 10:08 PM
dermot
I have wrriten a small windows service application in visual studio
..net 2003 which listens for incoming FTP files.
These files would overwrite over time due to duplicate file names.
However any time the windows service tries to rename the file (using
flFile.move(source,destination)) it gets an error saying access is
denied.

The files are on the network, so we though the local system account may
not have access
We tried changing the account the service uses to a domain admin, but
still got the same error.

The application runs fine as VB windows form

Any ideas, why windows service cannot do the same.

Many Thanks
Dermot French

Author
24 Jul 2006 11:37 PM
Michael D. Ober
Windows services, by default, don't have access to the network.  In w2k and
XP there is a network version of the system account you can use.

Mike Ober.

Show quoteHide quote
"dermot" <dfre***@tommyfrench.co.uk> wrote in message
news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> I have wrriten a small windows service application in visual studio
> .net 2003 which listens for incoming FTP files.
> These files would overwrite over time due to duplicate file names.
> However any time the windows service tries to rename the file (using
> flFile.move(source,destination)) it gets an error saying access is
> denied.
>
> The files are on the network, so we though the local system account may
> not have access
> We tried changing the account the service uses to a domain admin, but
> still got the same error.
>
> The application runs fine as VB windows form
>
> Any ideas, why windows service cannot do the same.
>
> Many Thanks
> Dermot French
>
Author
25 Jul 2006 7:35 AM
dermot
Mike,
I actually changed the account that starts it to a domain admin
account.  It can see the files (which the local system could not) -
however it cannot move the files (gets the access denied message)?

The services is running on a win 2003 server machine.
Any ideas

Regards,
Dermot


Michael D. Ober wrote:
Show quoteHide quote
> Windows services, by default, don't have access to the network.  In w2k and
> XP there is a network version of the system account you can use.
>
> Mike Ober.
>
> "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > I have wrriten a small windows service application in visual studio
> > .net 2003 which listens for incoming FTP files.
> > These files would overwrite over time due to duplicate file names.
> > However any time the windows service tries to rename the file (using
> > flFile.move(source,destination)) it gets an error saying access is
> > denied.
> >
> > The files are on the network, so we though the local system account may
> > not have access
> > We tried changing the account the service uses to a domain admin, but
> > still got the same error.
> >
> > The application runs fine as VB windows form
> >
> > Any ideas, why windows service cannot do the same.
> >
> > Many Thanks
> > Dermot French
> >
Author
25 Jul 2006 9:26 AM
tommaso.gastaldi
hi dermot

I think you are trying to get the files while they are still used by
the tcp.

You should allow some delay. When a file arrives do not assault it !

Place a timer and make an attempt every half second. You will see
some attempt will eventually succeed. Can place a limit to the number
of
attempts and log the possible unsuccesses.... let me know

-tom

dermot ha scritto:

Show quoteHide quote
> Mike,
> I actually changed the account that starts it to a domain admin
> account.  It can see the files (which the local system could not) -
> however it cannot move the files (gets the access denied message)?
>
> The services is running on a win 2003 server machine.
> Any ideas
>
> Regards,
> Dermot
>
>
> Michael D. Ober wrote:
> > Windows services, by default, don't have access to the network.  In w2k and
> > XP there is a network version of the system account you can use.
> >
> > Mike Ober.
> >
> > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > > I have wrriten a small windows service application in visual studio
> > > .net 2003 which listens for incoming FTP files.
> > > These files would overwrite over time due to duplicate file names.
> > > However any time the windows service tries to rename the file (using
> > > flFile.move(source,destination)) it gets an error saying access is
> > > denied.
> > >
> > > The files are on the network, so we though the local system account may
> > > not have access
> > > We tried changing the account the service uses to a domain admin, but
> > > still got the same error.
> > >
> > > The application runs fine as VB windows form
> > >
> > > Any ideas, why windows service cannot do the same.
> > >
> > > Many Thanks
> > > Dermot French
> > >
Author
25 Jul 2006 9:43 AM
dermot
That isn't the problem
It uses a notify filter, for last write and then delays

This works fine using exact same code from a Windows form application
(just doesn't work when I change it to Windows Services Application).

Regards,
Dermot

tommaso.gasta***@uniroma1.it wrote:
Show quoteHide quote
> hi dermot
>
> I think you are trying to get the files while they are still used by
> the tcp.
>
> You should allow some delay. When a file arrives do not assault it !
>
> Place a timer and make an attempt every half second. You will see
> some attempt will eventually succeed. Can place a limit to the number
> of
> attempts and log the possible unsuccesses.... let me know
>
> -tom
>
> dermot ha scritto:
>
> > Mike,
> > I actually changed the account that starts it to a domain admin
> > account.  It can see the files (which the local system could not) -
> > however it cannot move the files (gets the access denied message)?
> >
> > The services is running on a win 2003 server machine.
> > Any ideas
> >
> > Regards,
> > Dermot
> >
> >
> > Michael D. Ober wrote:
> > > Windows services, by default, don't have access to the network.  In w2k and
> > > XP there is a network version of the system account you can use.
> > >
> > > Mike Ober.
> > >
> > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > > > I have wrriten a small windows service application in visual studio
> > > > .net 2003 which listens for incoming FTP files.
> > > > These files would overwrite over time due to duplicate file names.
> > > > However any time the windows service tries to rename the file (using
> > > > flFile.move(source,destination)) it gets an error saying access is
> > > > denied.
> > > >
> > > > The files are on the network, so we though the local system account may
> > > > not have access
> > > > We tried changing the account the service uses to a domain admin, but
> > > > still got the same error.
> > > >
> > > > The application runs fine as VB windows form
> > > >
> > > > Any ideas, why windows service cannot do the same.
> > > >
> > > > Many Thanks
> > > > Dermot French
> > > >
Author
25 Jul 2006 12:17 PM
TDC
Watch out for using mapped drive letters.  These are done on a
user-by-user basis when they log in.  Try using the full network path
(like //corp_server/datadir/targetfile.txt) and see if that helps.

Tom


dermot wrote:
Show quoteHide quote
> That isn't the problem
> It uses a notify filter, for last write and then delays
>
> This works fine using exact same code from a Windows form application
> (just doesn't work when I change it to Windows Services Application).
>
> Regards,
> Dermot
>
> tommaso.gasta***@uniroma1.it wrote:
> > hi dermot
> >
> > I think you are trying to get the files while they are still used by
> > the tcp.
> >
> > You should allow some delay. When a file arrives do not assault it !
> >
> > Place a timer and make an attempt every half second. You will see
> > some attempt will eventually succeed. Can place a limit to the number
> > of
> > attempts and log the possible unsuccesses.... let me know
> >
> > -tom
> >
> > dermot ha scritto:
> >
> > > Mike,
> > > I actually changed the account that starts it to a domain admin
> > > account.  It can see the files (which the local system could not) -
> > > however it cannot move the files (gets the access denied message)?
> > >
> > > The services is running on a win 2003 server machine.
> > > Any ideas
> > >
> > > Regards,
> > > Dermot
> > >
> > >
> > > Michael D. Ober wrote:
> > > > Windows services, by default, don't have access to the network.  In w2k and
> > > > XP there is a network version of the system account you can use.
> > > >
> > > > Mike Ober.
> > > >
> > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > > > > I have wrriten a small windows service application in visual studio
> > > > > .net 2003 which listens for incoming FTP files.
> > > > > These files would overwrite over time due to duplicate file names.
> > > > > However any time the windows service tries to rename the file (using
> > > > > flFile.move(source,destination)) it gets an error saying access is
> > > > > denied.
> > > > >
> > > > > The files are on the network, so we though the local system account may
> > > > > not have access
> > > > > We tried changing the account the service uses to a domain admin, but
> > > > > still got the same error.
> > > > >
> > > > > The application runs fine as VB windows form
> > > > >
> > > > > Any ideas, why windows service cannot do the same.
> > > > >
> > > > > Many Thanks
> > > > > Dermot French
> > > > >
Author
25 Jul 2006 1:31 PM
dermot
I am using the full network path
The windows service can see the original files, it just cannot rename
them

Any ideas?

TDC wrote:
Show quoteHide quote
> Watch out for using mapped drive letters.  These are done on a
> user-by-user basis when they log in.  Try using the full network path
> (like //corp_server/datadir/targetfile.txt) and see if that helps.
>
> Tom
>
>
> dermot wrote:
> > That isn't the problem
> > It uses a notify filter, for last write and then delays
> >
> > This works fine using exact same code from a Windows form application
> > (just doesn't work when I change it to Windows Services Application).
> >
> > Regards,
> > Dermot
> >
> > tommaso.gasta***@uniroma1.it wrote:
> > > hi dermot
> > >
> > > I think you are trying to get the files while they are still used by
> > > the tcp.
> > >
> > > You should allow some delay. When a file arrives do not assault it !
> > >
> > > Place a timer and make an attempt every half second. You will see
> > > some attempt will eventually succeed. Can place a limit to the number
> > > of
> > > attempts and log the possible unsuccesses.... let me know
> > >
> > > -tom
> > >
> > > dermot ha scritto:
> > >
> > > > Mike,
> > > > I actually changed the account that starts it to a domain admin
> > > > account.  It can see the files (which the local system could not) -
> > > > however it cannot move the files (gets the access denied message)?
> > > >
> > > > The services is running on a win 2003 server machine.
> > > > Any ideas
> > > >
> > > > Regards,
> > > > Dermot
> > > >
> > > >
> > > > Michael D. Ober wrote:
> > > > > Windows services, by default, don't have access to the network.  In w2k and
> > > > > XP there is a network version of the system account you can use.
> > > > >
> > > > > Mike Ober.
> > > > >
> > > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > > > > > I have wrriten a small windows service application in visual studio
> > > > > > .net 2003 which listens for incoming FTP files.
> > > > > > These files would overwrite over time due to duplicate file names.
> > > > > > However any time the windows service tries to rename the file (using
> > > > > > flFile.move(source,destination)) it gets an error saying access is
> > > > > > denied.
> > > > > >
> > > > > > The files are on the network, so we though the local system account may
> > > > > > not have access
> > > > > > We tried changing the account the service uses to a domain admin, but
> > > > > > still got the same error.
> > > > > >
> > > > > > The application runs fine as VB windows form
> > > > > >
> > > > > > Any ideas, why windows service cannot do the same.
> > > > > >
> > > > > > Many Thanks
> > > > > > Dermot French
> > > > > >
Author
25 Jul 2006 3:05 PM
Claes Bergefall
Are you sure that the account has write access to the directory and files?
Sounds like it only has read access.

   /claes


Show quoteHide quote
"dermot" <dfre***@tommyfrench.co.uk> wrote in message
news:1153834300.863097.28130@h48g2000cwc.googlegroups.com...
>I am using the full network path
> The windows service can see the original files, it just cannot rename
> them
>
> Any ideas?
>
> TDC wrote:
>> Watch out for using mapped drive letters.  These are done on a
>> user-by-user basis when they log in.  Try using the full network path
>> (like //corp_server/datadir/targetfile.txt) and see if that helps.
>>
>> Tom
>>
>>
>> dermot wrote:
>> > That isn't the problem
>> > It uses a notify filter, for last write and then delays
>> >
>> > This works fine using exact same code from a Windows form application
>> > (just doesn't work when I change it to Windows Services Application).
>> >
>> > Regards,
>> > Dermot
>> >
>> > tommaso.gasta***@uniroma1.it wrote:
>> > > hi dermot
>> > >
>> > > I think you are trying to get the files while they are still used by
>> > > the tcp.
>> > >
>> > > You should allow some delay. When a file arrives do not assault it !
>> > >
>> > > Place a timer and make an attempt every half second. You will see
>> > > some attempt will eventually succeed. Can place a limit to the number
>> > > of
>> > > attempts and log the possible unsuccesses.... let me know
>> > >
>> > > -tom
>> > >
>> > > dermot ha scritto:
>> > >
>> > > > Mike,
>> > > > I actually changed the account that starts it to a domain admin
>> > > > account.  It can see the files (which the local system could not) -
>> > > > however it cannot move the files (gets the access denied message)?
>> > > >
>> > > > The services is running on a win 2003 server machine.
>> > > > Any ideas
>> > > >
>> > > > Regards,
>> > > > Dermot
>> > > >
>> > > >
>> > > > Michael D. Ober wrote:
>> > > > > Windows services, by default, don't have access to the network.
>> > > > > In w2k and
>> > > > > XP there is a network version of the system account you can use.
>> > > > >
>> > > > > Mike Ober.
>> > > > >
>> > > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
>> > > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
>> > > > > > I have wrriten a small windows service application in visual
>> > > > > > studio
>> > > > > > .net 2003 which listens for incoming FTP files.
>> > > > > > These files would overwrite over time due to duplicate file
>> > > > > > names.
>> > > > > > However any time the windows service tries to rename the file
>> > > > > > (using
>> > > > > > flFile.move(source,destination)) it gets an error saying access
>> > > > > > is
>> > > > > > denied.
>> > > > > >
>> > > > > > The files are on the network, so we though the local system
>> > > > > > account may
>> > > > > > not have access
>> > > > > > We tried changing the account the service uses to a domain
>> > > > > > admin, but
>> > > > > > still got the same error.
>> > > > > >
>> > > > > > The application runs fine as VB windows form
>> > > > > >
>> > > > > > Any ideas, why windows service cannot do the same.
>> > > > > >
>> > > > > > Many Thanks
>> > > > > > Dermot French
>> > > > > >
>
Author
25 Jul 2006 10:06 PM
dermot
It is a domain admin account, and has also been given all rights on the
folder in question.


Claes Bergefall wrote:
Show quoteHide quote
> Are you sure that the account has write access to the directory and files?
> Sounds like it only has read access.
>
>    /claes
>
>
> "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> news:1153834300.863097.28130@h48g2000cwc.googlegroups.com...
> >I am using the full network path
> > The windows service can see the original files, it just cannot rename
> > them
> >
> > Any ideas?
> >
> > TDC wrote:
> >> Watch out for using mapped drive letters.  These are done on a
> >> user-by-user basis when they log in.  Try using the full network path
> >> (like //corp_server/datadir/targetfile.txt) and see if that helps.
> >>
> >> Tom
> >>
> >>
> >> dermot wrote:
> >> > That isn't the problem
> >> > It uses a notify filter, for last write and then delays
> >> >
> >> > This works fine using exact same code from a Windows form application
> >> > (just doesn't work when I change it to Windows Services Application).
> >> >
> >> > Regards,
> >> > Dermot
> >> >
> >> > tommaso.gasta***@uniroma1.it wrote:
> >> > > hi dermot
> >> > >
> >> > > I think you are trying to get the files while they are still used by
> >> > > the tcp.
> >> > >
> >> > > You should allow some delay. When a file arrives do not assault it !
> >> > >
> >> > > Place a timer and make an attempt every half second. You will see
> >> > > some attempt will eventually succeed. Can place a limit to the number
> >> > > of
> >> > > attempts and log the possible unsuccesses.... let me know
> >> > >
> >> > > -tom
> >> > >
> >> > > dermot ha scritto:
> >> > >
> >> > > > Mike,
> >> > > > I actually changed the account that starts it to a domain admin
> >> > > > account.  It can see the files (which the local system could not) -
> >> > > > however it cannot move the files (gets the access denied message)?
> >> > > >
> >> > > > The services is running on a win 2003 server machine.
> >> > > > Any ideas
> >> > > >
> >> > > > Regards,
> >> > > > Dermot
> >> > > >
> >> > > >
> >> > > > Michael D. Ober wrote:
> >> > > > > Windows services, by default, don't have access to the network.
> >> > > > > In w2k and
> >> > > > > XP there is a network version of the system account you can use.
> >> > > > >
> >> > > > > Mike Ober.
> >> > > > >
> >> > > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> >> > > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> >> > > > > > I have wrriten a small windows service application in visual
> >> > > > > > studio
> >> > > > > > .net 2003 which listens for incoming FTP files.
> >> > > > > > These files would overwrite over time due to duplicate file
> >> > > > > > names.
> >> > > > > > However any time the windows service tries to rename the file
> >> > > > > > (using
> >> > > > > > flFile.move(source,destination)) it gets an error saying access
> >> > > > > > is
> >> > > > > > denied.
> >> > > > > >
> >> > > > > > The files are on the network, so we though the local system
> >> > > > > > account may
> >> > > > > > not have access
> >> > > > > > We tried changing the account the service uses to a domain
> >> > > > > > admin, but
> >> > > > > > still got the same error.
> >> > > > > >
> >> > > > > > The application runs fine as VB windows form
> >> > > > > >
> >> > > > > > Any ideas, why windows service cannot do the same.
> >> > > > > >
> >> > > > > > Many Thanks
> >> > > > > > Dermot French
> >> > > > > >
> >
Author
26 Jul 2006 2:40 AM
Michael D. Ober
Please verify both the share permissions and the NTFS permissions.  I had a
similar problem and my share permissions were wrong.

Mike Ober.

Show quoteHide quote
"dermot" <dfre***@tommyfrench.co.uk> wrote in message
news:1153865186.288388.28850@i3g2000cwc.googlegroups.com...
> It is a domain admin account, and has also been given all rights on the
> folder in question.
>
>
> Claes Bergefall wrote:
> > Are you sure that the account has write access to the directory and
files?
> > Sounds like it only has read access.
> >
> >    /claes
> >
> >
> > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > news:1153834300.863097.28130@h48g2000cwc.googlegroups.com...
> > >I am using the full network path
> > > The windows service can see the original files, it just cannot rename
> > > them
> > >
> > > Any ideas?
> > >
> > > TDC wrote:
> > >> Watch out for using mapped drive letters.  These are done on a
> > >> user-by-user basis when they log in.  Try using the full network path
> > >> (like //corp_server/datadir/targetfile.txt) and see if that helps.
> > >>
> > >> Tom
> > >>
> > >>
> > >> dermot wrote:
> > >> > That isn't the problem
> > >> > It uses a notify filter, for last write and then delays
> > >> >
> > >> > This works fine using exact same code from a Windows form
application
> > >> > (just doesn't work when I change it to Windows Services
Application).
> > >> >
> > >> > Regards,
> > >> > Dermot
> > >> >
> > >> > tommaso.gasta***@uniroma1.it wrote:
> > >> > > hi dermot
> > >> > >
> > >> > > I think you are trying to get the files while they are still used
by
> > >> > > the tcp.
> > >> > >
> > >> > > You should allow some delay. When a file arrives do not assault
it !
> > >> > >
> > >> > > Place a timer and make an attempt every half second. You will see
> > >> > > some attempt will eventually succeed. Can place a limit to the
number
> > >> > > of
> > >> > > attempts and log the possible unsuccesses.... let me know
> > >> > >
> > >> > > -tom
> > >> > >
> > >> > > dermot ha scritto:
> > >> > >
> > >> > > > Mike,
> > >> > > > I actually changed the account that starts it to a domain admin
> > >> > > > account.  It can see the files (which the local system could
not) -
> > >> > > > however it cannot move the files (gets the access denied
message)?
> > >> > > >
> > >> > > > The services is running on a win 2003 server machine.
> > >> > > > Any ideas
> > >> > > >
> > >> > > > Regards,
> > >> > > > Dermot
> > >> > > >
> > >> > > >
> > >> > > > Michael D. Ober wrote:
> > >> > > > > Windows services, by default, don't have access to the
network.
> > >> > > > > In w2k and
> > >> > > > > XP there is a network version of the system account you can
use.
> > >> > > > >
> > >> > > > > Mike Ober.
> > >> > > > >
> > >> > > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > >> > > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > >> > > > > > I have wrriten a small windows service application in
visual
> > >> > > > > > studio
> > >> > > > > > .net 2003 which listens for incoming FTP files.
> > >> > > > > > These files would overwrite over time due to duplicate file
> > >> > > > > > names.
> > >> > > > > > However any time the windows service tries to rename the
file
> > >> > > > > > (using
> > >> > > > > > flFile.move(source,destination)) it gets an error saying
access
> > >> > > > > > is
> > >> > > > > > denied.
> > >> > > > > >
> > >> > > > > > The files are on the network, so we though the local system
> > >> > > > > > account may
> > >> > > > > > not have access
> > >> > > > > > We tried changing the account the service uses to a domain
> > >> > > > > > admin, but
> > >> > > > > > still got the same error.
> > >> > > > > >
> > >> > > > > > The application runs fine as VB windows form
> > >> > > > > >
> > >> > > > > > Any ideas, why windows service cannot do the same.
> > >> > > > > >
> > >> > > > > > Many Thanks
> > >> > > > > > Dermot French
> > >> > > > > >
> > >
>
>
Author
3 Aug 2006 12:09 PM
dermot
It was permissions, the person who installed it had no put it under the
correct account.

Thanks for the help - it is now working
Michael D. Ober wrote:
Show quoteHide quote
> Please verify both the share permissions and the NTFS permissions.  I had a
> similar problem and my share permissions were wrong.
>
> Mike Ober.
>
> "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> news:1153865186.288388.28850@i3g2000cwc.googlegroups.com...
> > It is a domain admin account, and has also been given all rights on the
> > folder in question.
> >
> >
> > Claes Bergefall wrote:
> > > Are you sure that the account has write access to the directory and
> files?
> > > Sounds like it only has read access.
> > >
> > >    /claes
> > >
> > >
> > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > > news:1153834300.863097.28130@h48g2000cwc.googlegroups.com...
> > > >I am using the full network path
> > > > The windows service can see the original files, it just cannot rename
> > > > them
> > > >
> > > > Any ideas?
> > > >
> > > > TDC wrote:
> > > >> Watch out for using mapped drive letters.  These are done on a
> > > >> user-by-user basis when they log in.  Try using the full network path
> > > >> (like //corp_server/datadir/targetfile.txt) and see if that helps.
> > > >>
> > > >> Tom
> > > >>
> > > >>
> > > >> dermot wrote:
> > > >> > That isn't the problem
> > > >> > It uses a notify filter, for last write and then delays
> > > >> >
> > > >> > This works fine using exact same code from a Windows form
> application
> > > >> > (just doesn't work when I change it to Windows Services
> Application).
> > > >> >
> > > >> > Regards,
> > > >> > Dermot
> > > >> >
> > > >> > tommaso.gasta***@uniroma1.it wrote:
> > > >> > > hi dermot
> > > >> > >
> > > >> > > I think you are trying to get the files while they are still used
> by
> > > >> > > the tcp.
> > > >> > >
> > > >> > > You should allow some delay. When a file arrives do not assault
> it !
> > > >> > >
> > > >> > > Place a timer and make an attempt every half second. You will see
> > > >> > > some attempt will eventually succeed. Can place a limit to the
> number
> > > >> > > of
> > > >> > > attempts and log the possible unsuccesses.... let me know
> > > >> > >
> > > >> > > -tom
> > > >> > >
> > > >> > > dermot ha scritto:
> > > >> > >
> > > >> > > > Mike,
> > > >> > > > I actually changed the account that starts it to a domain admin
> > > >> > > > account.  It can see the files (which the local system could
> not) -
> > > >> > > > however it cannot move the files (gets the access denied
> message)?
> > > >> > > >
> > > >> > > > The services is running on a win 2003 server machine.
> > > >> > > > Any ideas
> > > >> > > >
> > > >> > > > Regards,
> > > >> > > > Dermot
> > > >> > > >
> > > >> > > >
> > > >> > > > Michael D. Ober wrote:
> > > >> > > > > Windows services, by default, don't have access to the
> network.
> > > >> > > > > In w2k and
> > > >> > > > > XP there is a network version of the system account you can
> use.
> > > >> > > > >
> > > >> > > > > Mike Ober.
> > > >> > > > >
> > > >> > > > > "dermot" <dfre***@tommyfrench.co.uk> wrote in message
> > > >> > > > > news:1153778884.852703.162660@s13g2000cwa.googlegroups.com...
> > > >> > > > > > I have wrriten a small windows service application in
> visual
> > > >> > > > > > studio
> > > >> > > > > > .net 2003 which listens for incoming FTP files.
> > > >> > > > > > These files would overwrite over time due to duplicate file
> > > >> > > > > > names.
> > > >> > > > > > However any time the windows service tries to rename the
> file
> > > >> > > > > > (using
> > > >> > > > > > flFile.move(source,destination)) it gets an error saying
> access
> > > >> > > > > > is
> > > >> > > > > > denied.
> > > >> > > > > >
> > > >> > > > > > The files are on the network, so we though the local system
> > > >> > > > > > account may
> > > >> > > > > > not have access
> > > >> > > > > > We tried changing the account the service uses to a domain
> > > >> > > > > > admin, but
> > > >> > > > > > still got the same error.
> > > >> > > > > >
> > > >> > > > > > The application runs fine as VB windows form
> > > >> > > > > >
> > > >> > > > > > Any ideas, why windows service cannot do the same.
> > > >> > > > > >
> > > >> > > > > > Many Thanks
> > > >> > > > > > Dermot French
> > > >> > > > > >
> > > >
> >
> >