473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to Copy a File within an ASP.NET-Page

Hi

How can I copy a File within an ASP.NET-Page. The location of the file
is a
Network-Drive.
I tried File.copy but it doesn't work. The error is "Could not find
file ...".
Is there a function where I can use another user (a network-user) and
not the local user "aspnet"?

Thanks for answering.

Philipp
Nov 17 '05 #1
3 1257
You could use impersonation, using an account which has access to the
network share. To do this, you need to put the line <identity
impersonate="true" userName="username" password="password /> in web.config.

Mun


"Philipp Hänggi" <ph*************@rohner.ch> wrote in message
news:74**************************@posting.google.c om...
Hi

How can I copy a File within an ASP.NET-Page. The location of the file
is a
Network-Drive.
I tried File.copy but it doesn't work. The error is "Could not find
file ...".
Is there a function where I can use another user (a network-user) and
not the local user "aspnet"?

Thanks for answering.

Philipp

Nov 17 '05 #2
Check out this article:
http://msdn.microsoft.com/library/de...onateTopic.asp
"Philipp Hänggi" <ph*************@rohner.ch> wrote in message
news:74**************************@posting.google.c om...
Hi

How can I copy a File within an ASP.NET-Page. The location of the file
is a
Network-Drive.
I tried File.copy but it doesn't work. The error is "Could not find
file ...".
Is there a function where I can use another user (a network-user) and
not the local user "aspnet"?

Thanks for answering.

Philipp
Nov 17 '05 #3
I have the same problem and nothing discribed here helpe

I am using a Windows 2000 Server and all examples say, not tested or applicable for windows 2000

so doe anybody knoe how to get it work for windows 2000

any help is really appreciated!

thaks reinhar

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Greg | last post by:
looking for an easy way for users to browse for a file on their local drive, and then have access automatically make a copy of that file (files will most likely be images) and save it under a new...
4
by: John Blair | last post by:
Hi, Can anyone tell me how to make the Copy Project option work from within Vb.net - it fails on my PC with an error saying the new copy directory is marked as executable and i am not allowed to...
6
by: RitaG | last post by:
Hello. I have a VB.Net program that copies a file from one server to another server. This program has been working without any problems for about a year. A couple of weeks ago the "server from"...
1
by: ajc308 | last post by:
I'm attempting to sort the <file>s within each <directory> in my XML according to their file extension, then write out the resulting sorted data back to XML format. I had it working before, and when...
4
by: Tom | last post by:
Every week our web guys publish the web site to all of our servers by logging into the server and doing a copy - paiste. We want to elminate the developers from logging into each server and doing...
2
by: Jeff | last post by:
....hope this question is on the right ng. The code below works to copy all files and folders from D:\Template to a new location that is specified by the user. Is there any easy way to modify...
1
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to...
4
by: Vili | last post by:
How to copy a visual studio 2005 web project with another name? I have a visual studio project 2005 web project "myWebSite1" in visual source safe I would like to copy this project with another...
7
by: Jason | last post by:
How would I create a simple vb script with a GUI interface to copy files from a fileserver to a PC. for example, I would have a form with Radio Buttons or Check Boxes box1 - copy prefs box2 -...
3
by: ncsthbell | last post by:
I support an access (2000) application. I have a request to copy this application to another location from within the application. I have used the the filescriptingobject fs.copyfile, it leaves the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.