Ask a Question related to ASP.NET Security, Design and Development.
-
Bunty #1
Impersonation when performing IO operation using File.Copy
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\MediaAdministrati on\createclip.aspx.vb:159
SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
C:\Web\Technicolor\SampleDailies\MediaAdministrati on\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
Bunty Guest
-
Impersonation problem - logs on ok but no file access ?? Please help!
Hi, I am writing a windows forms app and i need to access a fileshare but impersonating another user (rather than the userlogged on). All my code... -
Best Practices for Impersonation and File Upload?
Grant ASPNET permissions to the folder, assuming the folder is on the same server IIS is running. If not, you'll have to go for another option. ... -
Error: Could not complete this operation. The file could not be found.
When attempting to open .psd, .jpg, .gif, and other image files in Adobe ImageReady CS, I'm frequently, sporadically, and without rhyme or reason,... -
HELP! File name or class name not found during Automation operation
Could someone point me in the right direction? I've migrated three FrontPage 2002 websites to a new web server. Each web site has a Access 2000... -
The file 'bin\WebProj.dll' cannot be copied to the run directory. The requested operation cannot be performed on a file with a user-mapped section open.
Hi, All, I got this error when trying to compile a web project. The file 'bin\Kennel.dll' cannot be copied to the run directory. The requested... -
Daniel Fisher\(lennybacon\) #2
Re: Impersonation when performing IO operation using File.Copy
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: [url]http://www.lennybacon.com/[/url]
"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\MediaAdministrati on\createclip.aspx.vb:159
> SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
> C:\Web\Technicolor\SampleDailies\MediaAdministrati on\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
>
Daniel Fisher\(lennybacon\) Guest
-
Bunty #3
Re: Impersonation when performing IO operation using File.Copy
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: [url]http://www.lennybacon.com/[/url]
>
>
> "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\MediaAdministrati on\createclip.aspx.vb:159
> > SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
> > C:\Web\Technicolor\SampleDailies\MediaAdministrati on\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
> >
>
>Bunty Guest
-
Bunty #4
Re: Impersonation when performing IO operation using File.Copy
Hi Danial,
I guess I did not read your response very carefully. I did not understand
the what you mean by identity admin?
Actual remote path in my case looks like
'\\remotecomputer\remotefolder1\folder2\folder3' and the error message i am
getting is 'Could not find part of the path "\\remotecomputer\remotefolder" '.
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: [url]http://www.lennybacon.com/[/url]
>
>
> "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\MediaAdministrati on\createclip.aspx.vb:159
> > SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
> > C:\Web\Technicolor\SampleDailies\MediaAdministrati on\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
> >
>
>Bunty Guest
-
Patrick Olurotimi Ige #5
Re: Impersonation when performing IO operation using File.Copy
Bunty..
I have made a similar application and ur error see WIERD!
U said u have impersonated but are u usre the user has access to the
FOLDERS..and is it well shared..
Does the server u are copying the files to have ASPNET acct?
If u can try posting the code u are using..
Hope this helps.
Patrick
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Patrick Olurotimi Ige Guest
-
Bunty #6
Re: Impersonation when performing IO operation using File.Copy
Patrick,
Yes, the remote server is also running ASPNET acct. It is also running IIS6
for some other purpose.
Folders on the remote server are well shared and also assigned proper
permissions to the folder and to the domain user (the user I am trying to
impersonate).
Thanks,
Bunty
"Patrick Olurotimi Ige" wrote:
> Bunty..
> I have made a similar application and ur error see WIERD!
> U said u have impersonated but are u usre the user has access to the
> FOLDERS..and is it well shared..
> Does the server u are copying the files to have ASPNET acct?
> If u can try posting the code u are using..
> Hope this helps.
> Patrick
>
>
>
>
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
>Bunty Guest
-
Patrick Olurotimi Ige #7
Re: Impersonation when performing IO operation using File.Copy
Bunty...ok then..
But is the error still active?
Patrick
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Patrick Olurotimi Ige Guest
-
Bunty #8
Re: Impersonation when performing IO operation using File.Copy
Yes, error is still active and i am trying to figure out the solution for that.
Thanks,
Bhupendra
"Patrick Olurotimi Ige" wrote:
> Bunty...ok then..
> But is the error still active?
> Patrick
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
>Bunty Guest
-
Oleg #9
Re: Impersonation when performing IO operation using File.Copy
You need search more info about delegation.
"Bunty" <Bunty@discussions.microsoft.com> wrote in message
news:77D1AD49-B6D4-41B7-81EC-5E191E9F2272@microsoft.com...> 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: [url]http://www.lennybacon.com/[/url]
>>
>>
>> "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\MediaAdministrati on\createclip.aspx.vb:159
>> > SampleDailies.createclip.Page_Load(Object sender, EventArgs e) in
>> > C:\Web\Technicolor\SampleDailies\MediaAdministrati on\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
>> >
>>
>>
Oleg Guest



Reply With Quote

