473,396 Members | 2,111 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,396 software developers and data experts.

Move file between computers

Eje
I have a webapplication on a server. One function is to
build txt-files. These files should then be moved to a
fixed directory on another computer in the company
network.

I have tried to use System.IO.File.Move but get the
message "Could not find a part of the path". The path to
the receiving directory is mapped.

I get the same message independant of receiving computer
and independant of which command I try under System.IO. I
have no problem to move the files to another location on
the server.

With Explorer I have full access to the directories.

Does anyone have a solution how to move the files?

Eje
Nov 19 '05 #1
2 2039
Mapped drives are stored per user profile. The account that ASP.NET is
running under doesn't have the drives mapped. You would have to use a UNC
path to the drive.
I would, however, question what you are doing. Web applications moving
files about on a corporate network has some serious security implications ...
and your web applications would need to have permissions on other machines on
the network. This presents a significant amount of risk, especially if the
web site is public-facing. There are less risky ways to accomplish what you
need to do without having the web application directly writing files across
the network.

"Eje" wrote:
I have a webapplication on a server. One function is to
build txt-files. These files should then be moved to a
fixed directory on another computer in the company
network.

I have tried to use System.IO.File.Move but get the
message "Could not find a part of the path". The path to
the receiving directory is mapped.

I get the same message independant of receiving computer
and independant of which command I try under System.IO. I
have no problem to move the files to another location on
the server.

With Explorer I have full access to the directories.

Does anyone have a solution how to move the files?

Eje

Nov 19 '05 #2
Thanks for your answer.

In this case the files are extracts from the SQL Server.
Finally they will be xls-files but I found it difficult
to make the DTS function just by pressing a button on a
webpage. Instead I thought I could produce txt-files with
delimiter and send to the another (but just one) server
in the network for later import to Excel. Today the
application is not public but the intention is to make it
public in the future.

Do you have a suggestion how to solve this problem?

Eje
-----Original Message-----
Mapped drives are stored per user profile. The account that ASP.NET isrunning under doesn't have the drives mapped. You would have to use a UNCpath to the drive.
I would, however, question what you are doing. Web applications movingfiles about on a corporate network has some serious security implications ...and your web applications would need to have permissions on other machines onthe network. This presents a significant amount of risk, especially if theweb site is public-facing. There are less risky ways to accomplish what youneed to do without having the web application directly writing files acrossthe network.

"Eje" wrote:
I have a webapplication on a server. One function is to build txt-files. These files should then be moved to a
fixed directory on another computer in the company
network.

I have tried to use System.IO.File.Move but get the
message "Could not find a part of the path". The path to the receiving directory is mapped.

I get the same message independant of receiving computer and independant of which command I try under System.IO. I have no problem to move the files to another location on the server.

With Explorer I have full access to the directories.

Does anyone have a solution how to move the files?

Eje

.

Nov 19 '05 #3

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

Similar topics

6
by: gnu | last post by:
Rationale to use Linux ======================= - I can't afford paying for $199 for the license of an OS that's arguably better thank Linux for each of 10 computers I have. - I want to be...
2
by: david | last post by:
I'm developing a Visual C++ database application which will be delivered to customers. Some customers install Access 97 on their computers, others install Acess 2000 or higher versions. In my...
3
by: SI | last post by:
I need to transfer a file from a central computer(Windows XP) to multiple 'branch' computers(WindowsNT/Windows2000) on a weekly basis. This transfer should be done programmatically in C#, when a user...
2
by: Jim | last post by:
I work in the environmental industry and we have large gcms instruments that aquire raw data to an attached computer. These computers are networked, and have shared folders so the data can be...
9
by: Joshua.Buss | last post by:
I am trying to move a record from one linked table to another within access, but I'm a complete beginner to VBA and don't know exactly where to begin. I have an access file that has the two...
1
by: kkizer | last post by:
I have a problem with this simple code below. Moving the files works perfectly, but once in a blue moon the file that it is trying to move dissapears before it can move it. and when this happens...
3
by: Arpan | last post by:
A Form has a FileUpload, 2 Buttons & a TextBox web server controls. Using the FileUpload control, I want to give users the provision to move & delete files that DO NOT exist in C:\Inetpub\wwwroot...
0
by: Paul Brady | last post by:
I volunteer at a youth ministry agency and help them with their student database. They have two computers, both running Windows XP. Both have Office 2002 installed without Access, except that...
7
by: michmcgrath | last post by:
The format is 2000, created using 2002, it is still in development. There is a workgroup file that determines permissions, users login The workgroup and database are located on a network where...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.