Re: Network Share
From: Naveen K Kohli (naveenkohli_at_hotmail.com)
Date: 06/25/04
- Previous message: Cesar Saucedo: "Getting "A potentially Dangerous Request.Cookies Value" error"
- In reply to: Paul van't Klooster: "Network Share"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 24 Jun 2004 22:34:46 -0400
You can use impersonation to run the thread under a certain user's context.
Look at the documentation for WindowsIdentity class. There is an example
that shows imperosnation. Or you can take a look at the following article
that explains it.
http://www.netomatix.com/ImpersonateUser.aspx
Naveen K Kohli
http://www.netomatix.com
"Paul van't Klooster" <paul.vantklooster@nz.unisys.com> wrote in message
news:cbbmea$262j$1@si05.rsvl.unisys.com...
> Hi Everyone,
>
> This question may have already been asked before, but I can't seem to find
> any answers to it:
>
> In C# I know it is possible to access files using UNC path names, but how
do
> I access a share on a computer with a different user name and password?
>
> In windows explorer when you try and access a share and you don't have the
> correct credentials to access the target computer you get a box for an
> username and password.
>
> Is it possible to get this box, or programatically provide the user name
and
> password to use to access files on a remote computer using C# rather than
> getting the "Access Denied" exception? I need to be able to do this
without
> changing any security settings on the calling or target machines.
>
> I hope anyone can help with this, and I thank you in advance.
> Paul
>
>
- Previous message: Cesar Saucedo: "Getting "A potentially Dangerous Request.Cookies Value" error"
- In reply to: Paul van't Klooster: "Network Share"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]