Re: Impersonation when performing IO operation using File.Copy
From: Bunty (Bunty_at_discussions.microsoft.com)
Date: 12/13/04
- Previous message: Pradeep Gupta via DotNetMonster.com: "Re: Win32 Application CryptoAPI"
- In reply to: Daniel Fisher\(lennybacon\): "Re: Impersonation when performing IO operation using File.Copy"
- Next in thread: Bunty: "Re: Impersonation when performing IO operation using File.Copy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 13 Dec 2004 12:45:08 -0800
Hi Daniel,
Thanks for your reply,
Yes, user does have permission to the specified folder. I am impersonating
domain user which has all the permissions on the folder.
And the error I am getting is not at all is related to the permissions. It
does not find the file at all. And file does exist in that folder but it
still raises "Could not find file'' " error.
Thanks,
Bhupendra
"Daniel Fisher(lennybacon)" wrote:
> Hi Bhupendra
>
> Does the impersonated identity hav permissions on
> "\\remotecomputer\C$\Asset\1_4.wmv" ?
> Cause of "C$" is the identity admin?
>
> --
> Daniel Fisher(lennybacon)
> MCP ASP.NET C#
> Blog: http://www.lennybacon.com/
>
>
> "Bunty" <Bunty@discussions.microsoft.com> wrote in message
> news:DA572378-FF33-469E-A484-DEF5B56D49A9@microsoft.com...
> > Hello,
> > I am trying to implement impersonation for the copying file from one
> > remote
> > directory to the other remote drive on the same server in ASP.Net page.
> >
> > Impersonation seems to be working fine. It seems to perform the
> > impersonation but when it tries to copy the file then it raises the
> > exception
> > 'Could not find the specified "...."'.
> >
> > I am sure that the file exists in that folder but still it is raising the
> > same error everytime.
> >
> > Here is detail of the complete error
> >
> > Server Error in '/' Application.
> > --------------------------------------------------------------------------------
> >
> > Could not find file "\\remotecomputer\C$\Asset\1_4.wmv".
> > Description: An unhandled exception occurred during the execution of the
> > current web request. Please review the stack trace for more information
> > about
> > the error and where it originated in the code.
> >
> > Exception Details: System.IO.FileNotFoundException: Could not find file
> > "\\remotecomputer\C$\Asset\1_4.wmv".
> >
> > Source Error:
> >
> > An unhandled exception was generated during the execution of the current
> > web
> > request. Information regarding the origin and location of the exception
> > can
> > be identified using the exception stack trace below.
> >
> > Stack Trace:
> >
> >
> > [FileNotFoundException: Could not find file
> > "\\remotecomputer\C$\Asset\1_4.wmv".]
> > System.IO.__Error.WinIOError(Int32 errorCode, String str) +181
> > System.IO.File.InternalCopy(String sourceFileName, String destFileName,
> > Boolean overwrite) +314
> > System.IO.File.Copy(String sourceFileName, String destFileName) +7
> > SampleDailies.createclip.CreateFile() in
> > C:\Web\Technicolor\SampleDailies\MediaAdministration\createclip.aspx.vb:159
> > SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
> > C:\Web\Technicolor\SampleDailies\MediaAdministration\createclip.aspx.vb:28
> > System.Web.UI.Control.OnLoad(EventArgs e) +67
> > System.Web.UI.Control.LoadRecursive() +35
> > System.Web.UI.Page.ProcessRequestMain() +750
> >
> >
> > Thanks,
> > Bhupendra
> >
> >
> > --------------------------------------------------------------------------------
> > Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
> > ASP.NET
> > Version:1.1.4322.2032
> >
>
>
>
- Previous message: Pradeep Gupta via DotNetMonster.com: "Re: Win32 Application CryptoAPI"
- In reply to: Daniel Fisher\(lennybacon\): "Re: Impersonation when performing IO operation using File.Copy"
- Next in thread: Bunty: "Re: Impersonation when performing IO operation using File.Copy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|