Logging on machine and accessing UNC share
am 19.12.2007 12:17:30 von 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?
Re: Logging on machine and accessing UNC share
am 19.12.2007 12:24:22 von nemtsev
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>
Re: Logging on machine and accessing UNC share
am 19.12.2007 12:39:34 von Chris Ashley
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.
On Dec 19, 11:24 am, Michael Nemtsev [MVP] wrote:
> 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>