Re: Windows Service Cannot Move Files

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Please verify both the share permissions and the NTFS permissions. I had a
similar problem and my share permissions were wrong.

Mike Ober.

"dermot" <dfrench@xxxxxxxxxxxxxxxxx> wrote in message
news:1153865186.288388.28850@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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" <dfrench@xxxxxxxxxxxxxxxxx> wrote in message
news:1153834300.863097.28130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.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







.



Relevant Pages

  • Re: SQL server does not exist or access denied
    ... > It sound like your windows service is going to access ... > account - use User for the Account property. ... >>> NT AUTHORITY\SYSTEM doesn't exists in sql server ... >>> the fine permissions on the selected table? ...
    (microsoft.public.sqlserver.connect)
  • Re: Windows Service Account
    ... He has said that it work when using "Local System" account, but not when using "Local Servic" account. ... Since you use Jet database, the user account that runs the application and accesses data in it must have read/write permission to the folder where the *.mdb file is in. ... Local Service account, on the other hand, has very limited access to computer resources by default, you need to explicitly assign permissions to this account to use resources on the computer. ... Of course you can choose other user account to run the windows service as long as the account has sufficient access permissions. ...
    (microsoft.public.dotnet.general)
  • Re: Incoming E-Mail - cant create contact in OU
    ... account out of local administrator to attempt to find any denied access. ... I then added full permissions to my user account on both of these keys, ... local admin rights to the server hosting incoming email. ... what permission I need to give the app pool locally to avoid this issue. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Incoming E-Mail - cant create contact in OU
    ... account out of local administrator to attempt to find any denied ... I then added full permissions to my user account on both of these keys, ... that's for every app pool you create for every new web app on the ... local admin rights to the server hosting incoming email. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Win2k - Account Operator not working properly
    ... You very likely have other ACL issues other than what was mentioned and I can point them out here for you for free or you can pay someone $200-500 an hour to come check it out. ... In order for that to result in inheritence protection it means the schema had to be modified. ... set the account in the GUI to inherit from its parents. ... Used the delegation wizard, on the top level OU, to assign the desired permissions. ...
    (microsoft.public.windows.server.active_directory)