Logging on machine and accessing UNC share

  • Thread starter Thread starter Chris Ashley
  • Start date Start date
C

Chris Ashley

I have a .NET Windows Service which needs to log on to another machine
to access a UNC share. Is this possible? I assume so due to the
existence of the NetworkCredential class, but I can't find any
associated class to access the share using a NetworkCredential object?
 
Hello Chris,

its because the NETWORK SERVICE, which is used to start you services, has
no rights to network shares


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


CA> I have a .NET Windows Service which needs to log on to another
CA> machine to access a UNC share. Is this possible? I assume so due to
CA> the existence of the NetworkCredential class, but I can't find any
CA> associated class to access the share using a NetworkCredential
CA> object?
CA>
 
Can I not switch accounts programmatically, or log on to the share
using another account programmatically though? There is a limited
local account available on the machine just for this purpose.
 
Back
Top