joshua7
Member
- Joined
- Dec 14, 2005
- Messages
- 8
- Programming Experience
- 1-3
first off, issues similar to mine have been raised in other threads (http://www.vbdotnetforums.com/showthread.php?t=4773) and in this post: http://www.vbdotnetforums.com/showthread.php?t=4524 the poster seems to have found a solution (impersonation), but does not explain how to go about implementing it, so i have decided to repost the issue.
i have a windows service that pulls some stuff from sql, formats it, dumps it to a dat file, and then copies that across the network. everything works fine as an application, but when the code is run as a service it bombs out at the "copy file across network" section due to an "access is denied" error.
it seems to me, services run under various accounts vs whatever the user account is for an applicaton. the default, being "local system" appears to not have suffecient privileges to map to, copy to, or access files over the network.
i have tried setting up my service, both through installation, and manually in services.msc, as administrator on my local box, which has permissions to access these resources. however access is still denied. when i try setting the service up as a user on the destination box, it will not even register, which does make sense.
currently i am at a bit of stand still. if, even under the administrator account (which reads as ./administrator in the snap in) i cannot access mapped files how can i indeed do it at all?
i do not know how to impersonate user accounts or if this process falls under the service installer or within the service code itself.
if any one knows any good links (i have been googling for a while now) related windows service permissions and network communication or impersonation please let us know. thanks.
i have a windows service that pulls some stuff from sql, formats it, dumps it to a dat file, and then copies that across the network. everything works fine as an application, but when the code is run as a service it bombs out at the "copy file across network" section due to an "access is denied" error.
it seems to me, services run under various accounts vs whatever the user account is for an applicaton. the default, being "local system" appears to not have suffecient privileges to map to, copy to, or access files over the network.
i have tried setting up my service, both through installation, and manually in services.msc, as administrator on my local box, which has permissions to access these resources. however access is still denied. when i try setting the service up as a user on the destination box, it will not even register, which does make sense.
currently i am at a bit of stand still. if, even under the administrator account (which reads as ./administrator in the snap in) i cannot access mapped files how can i indeed do it at all?
i do not know how to impersonate user accounts or if this process falls under the service installer or within the service code itself.
if any one knows any good links (i have been googling for a while now) related windows service permissions and network communication or impersonation please let us know. thanks.