Move file between computers

E

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
 
G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top