You will probably need to start with the networkcredentials classes and work
out what you need to pass from there
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemnetnetworkcredentialclasstopic.asp
A better (quicker) approach would to install your service to run under a
designated account that has the correct permissions already to connect to
remote drives etc.
and this is a neccesary read........
http://www.ondotnet.com/pub/a/dotnet...rmissions.html
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Leo" <no****@newsgroups.com> wrote in message
news:00****************************@phx.gbl...
Hi,
I Need to access some files in a directory on server B
from a windows service (written in VB.NET) running on
server A (localsystem account).
How can I impersonate a user with sufficient rights on
server B from within the service running on server A so I
can access the files on server B?
Thanks in advance, Leo.