Re: Windows Service Cannot Move Files
- From: "TDC" <NOtcarvinSPAM@xxxxxxxxx>
- Date: 25 Jul 2006 05:17:00 -0700
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.gastaldi@xxxxxxxxxxx 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" <dfrench@xxxxxxxxxxxxxxxxx> wrote in message
news:1153778884.852703.162660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: Windows Service Cannot Move Files
- From: dermot
- Re: Windows Service Cannot Move Files
- References:
- Windows Service Cannot Move Files
- From: dermot
- Re: Windows Service Cannot Move Files
- From: Michael D. Ober
- Re: Windows Service Cannot Move Files
- From: dermot
- Re: Windows Service Cannot Move Files
- From: tommaso . gastaldi
- Re: Windows Service Cannot Move Files
- From: dermot
- Windows Service Cannot Move Files
- Prev by Date: Re: exceptions/inner exceptions
- Next by Date: Re: Coding style
- Previous by thread: Re: Windows Service Cannot Move Files
- Next by thread: Re: Windows Service Cannot Move Files
- Index(es):
Relevant Pages
|