Re: Impersonation when performing IO operation using File.Copy

From: Daniel Fisher\(lennybacon\) (info_at_(removethis)lennybacon.com)
Date: 12/13/04


Date: Mon, 13 Dec 2004 11:56:23 +0100

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
> 


Relevant Pages

  • Impersonation when performing IO operation using File.Copy
    ... Impersonation seems to be working fine. ... Server Error in '/' Application. ... An unhandled exception occurred during the execution of the ... System.IO.File.InternalCopy(String sourceFileName, String destFileName, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Impersonation in ASP.net
    ... Impersonation seems to be working fine. ... But it is raising the exception 'Could not find the file "...."'. ... Please review the stack trace for more information about ... System.IO.File.InternalCopy(String sourceFileName, String destFileName, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Cryptographic service provider (CSP) could not be found for this algorithm.
    ... The ASP.Net application uses impersonation (windows domain account). ... Cryptographic service provider could not be found for this algorithm. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.vsnet.debugging)
  • Cryptographic service provider (CSP) could not be found for this algorithm.
    ... The ASP.Net application uses impersonation (windows domain account). ... Cryptographic service provider could not be found for this algorithm. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.platformsdk.security)
  • Cryptographic service provider (CSP) could not be found for this algorithm.
    ... The ASP.Net application uses impersonation (windows domain account). ... Cryptographic service provider could not be found for this algorithm. ... An unhandled exception occurred during the execution of the ...
    (microsoft.public.dotnet.security)