HighTechTalks DotNet Forums  

Logging on machine and accessing UNC share

Dotnet General Discussions microsoft.public.dotnet.general


Discuss Logging on machine and accessing UNC share in the Dotnet General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Chris Ashley
 
Posts: n/a

Default Logging on machine and accessing UNC share - 12-19-2007 , 06:17 AM






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?

Reply With Quote
  #2  
Old   
Michael Nemtsev [MVP]
 
Posts: n/a

Default Re: Logging on machine and accessing UNC share - 12-19-2007 , 06:24 AM






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>



Reply With Quote
  #3  
Old   
Chris Ashley
 
Posts: n/a

Default Re: Logging on machine and accessing UNC share - 12-19-2007 , 06:39 AM



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] <nemt... (AT) msn (DOT) com> wrote:
Quote:
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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.