Move File From Web Server to File Server

Our organization has a web server and file server in the same domain.  On our public website ordering page, users have the ability to upload a document.  The document is currently saved on the Web server in a temp directory.  I need to move the uploaded file off the webserver and over to a specific directory on the file server.  I have tried using File.Move to accomplish this but encountered permission errors.  How does this need to be set up to work?

The code format I have is
File.Move ("c:\\dir\\file.ext", "\\\\fileserver\\dir\\file.ext");
Thanks in Advance
- Joe
Joe Bako
2/5/2005 1:58:25 AM 93655 articles. 5 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 42

When the code is running on the web server, make sure that the identity running that code, has access to both the source and destination of the file. Make sure that the user has write access to the destination. If you are using a local account, you will have to duplicate that user on both servers. 

hope this helps,

My Weblogs
2/5/2005 3:19:20 AM

Similar Artilces:

Move files from a web server to another web server
I am migriting my site from asp.3.0 to and I am used to simply copy files from my dev server to production server when my files are ready to go public. With I can't do that. What do I need to do before and after I copy my files to the production server to make it work. You can do a simple copy with .NET as well. You can copy all the files and directory structs but you only need the .ASPX, .ASCX, the DLL in the bin directory along with your other 'support' files. Also note that there is a 'copy project' option in VS.NET which will do the above.Mike Schellenberger - MCAD...

Uploading files to a different file server but not web server
Hi, I want to upload files to a different file server than the web server using, is that possible?I can use Server.MapPath to store it on the same server. How do I save it to a different machine? What all I need? Do I need IP address? Do I need to have a shared folder on that machine? thank u for the help!!! There is only a few built in ways to get a file from one machine to another in windows.  Things like FTP, HTTP, or File Sharing - you are going to need a path to the server.  You cannot upload directly to that server.  You'll need to upload to your web s...

how to save file (stored on SQL server) to file/web server?
Hi Experts, I got files stored on SQL server db. I would like to be able to save them onto file/web server. I know how to retrieve them, but not sure how to save to file/web server. Please help. Thanks so much. Below are codes for retrieving file info from sql server:Dim strFileName As String = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQuoteFileID)).Tables(0).Rows(0).Item("QuoteFileName")Dim strFileType As String = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQuoteFileID)).Tables(0).Rows(0).Item("QuoteFileType")Dim strFileSize As Integer = Quote.GetQuoteFileByQuoteFileID(CInt(selectedQ...

Web server as File server
Hello experts Scenario: i want to upload file on web server. Now i want to store that uploaded file to its hard drive (suppose D:\File). How can i get the physical path in order to store file.   plz reply fine regards Ali   One way to do this is to create a virtual folder say "Upload" in your web application and map it to the folder where you want to store the files. Now while saving, you can get the physical path byString sPath = Server.MapPath("Upload");String sFileName = "abcd.txt" File.SaveAs(sPath + sFilename);Another way i...

web server to file server
h most often web server is alsoused as a file/data server but it my case file server is sitting remotely. The problem is how can i transfer files that have been receive on the web server securely to file/data server and up date its path in db stored on web server. thanks in advance ali aligenius:The problem is how can i transfer files that have been receive on the web server securely to file/data server and up date its path in db stored on web server. Is there file server on the same domain as the web server?If so you can just save the file to a mapped network share on the file se...

encrypt a web.config file that is able to move from server to server
I need to encrypt part of a web.config file, but I wont want to have to do it on each machine that I move this application to.  What do i need ? I think the machine key is used to encrypt web.config sections. By default each machine autogenerates its own machine key which makes them unique.To use encrypted sections across machines (a typical web farm or cluster scenario), instead of using autogenerated machine keys you would want to generate a key and use the same one on both machines. You can even put the machine key in the web.config file but the most secure way would  be to pu...

File upload to a server other than the web server.
I have a very simple upload page. Everything works great when saving the file locally (web server). Things are getting ugly when trying to save files to a different machine (file server, database server,...) So, when using .SaveAs and passing in the UNC path to the new server location I get an *Access denied* error messgae. When mapping a network drive and using the drive letter in the .SaveAs path I get an message saying parts of the path cannot be found. any ideas? thanks  --tolgaApplication Developer Make sure that the account running web applicaiton(defa...

web.config unable to change DataDirectory after moving web site to server from local file system!
Developed web site in local file system with a form accessing the db in the app_data of solution. Now after moving the web site development directory to a server the form has an unresolved path. The web.config file is the place to sort this out but I am unable to find the spot dealing with the path since not everything in the web.config file is related to identifiable paths. How is this best solved? Do those paths have correct permissions?  If the path exists but the account doesn't have access, to that account it doesn't exist. JeffPlease: Don't forget to clic...

Access local server(LAN Server) from Web Server(Web Application Server)
Hello All I have a local server for my LAN and a Web server(at remote location).Is it possible to access my Local Server from my Web Server ? Thanks MS  ...

Move files to web server
I finished myApp in local pc. It is time to publish it to the web server. How many folders and files should I copy to web server? ...

add/change name/delete server files via web form
I have the add(upload) part of this page figured out. I have an application with an "Images" sub directory. I know how to access the getfiles() method from the system.IO namespace. I am using a while loop to create a table with an edit button (so that you can change the name of the file) and a delete button so you can remove the file from the server. Each file is on a new line much like it would look if it was bound to a datalist or datagrid. Here is where I am clueless. Can anyone point me in the right direction? I am not looking for someone to write this for me, beca...

copy file from web server to ftp server -- not working!
I've tried numerous iterations of the concept below, but I just can't get this to work.  We have a support page where users can upload files to the web server.  This works fine.  Now there is a request to post them to the company's ftp server.  This is the part I am having trouble with.  The code below gives the error: File Save error: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at ASP.form2_aspx.UploadToFTP(String filename, String ftpServerIP1) in e:\wwwroot\mysite\Form2.aspx:line 1203 at ASP.form2_asp...

saving file to a different server rather than on web server
Dear all , I have a .xls file . I want to uplaod the file on a DB server other than web sever . user selects the file from his/her local system and on clicking uplaod button , file should get uplaoded on a new server which is on intranet. I have written below codestring strPostFileName = flUplaod.PostedFile.FileName; string strOrgFileName = System.IO.Path.GetFileName(strPostFileName);string strFileName = dtTodayDate.ToString()+ "_" + strOrgFileName ; //string strDocLoc = strUpldDir + strFileName; string strUpldDir = ConfigurationSettings.AppSettings["BHCDataUplaod&quo...

copy files form a web server
Hi all, i want my application built in pb8, to be able to copy files(exe/txt... files) from our inertnet site to our local client machine.(our application is installed on our client machine). let's assume our address site is i want my application to be able to connect to and download specific files from this folder;(files according to a date parameters) can anyone give me any hint(script) about this. mean while, i'm working on that issue, but any help will be very appreciated... TIA There is a pretty compreh...

Web resources about - Move File From Web Server to File Server -

X.Org Server - Wikipedia, the free encyclopedia
X.Org Server refers to the X server release packages stewarded by the X.Org Foundation , which is hosted by , and grants public ...

CRTC Issues First-Ever Warrant To Take Down Toronto-Based Malware Server 4
TORONTO — The CRTC has issued its first warrant under the federal government's anti-spam legislation to take down a Toronto-based malware server ...

Windows Server 2016 moving to per core, not per socket, licensing
Windows Server 2016, not likely to arrive until the second half of next year, is going to shake up the way Microsoft licenses its server operating ...

Intel Rising: Server Stronger Than Ever, Says JMP; Here Comes Apple?
... stock to Market Outperform from Market Perform, assigning a $45 price target, righting that the company will strengthen its hold on its server ...

Dell announces Datacenter Scalable Solutions server line
In an effort to expand its share of the server market, Dell has announced today that it will be launching a new line of servers targeting companies ...

Bloodborne servers taken down for 'emergency maintenance'
An exploit and other "serious issues" have been detected.

Senator Wonders If Hillary Is Covering Legal Expenses For Tech Firm That Managed Her Email Server
Senator Wonders If Hillary Is Covering Legal Expenses For Tech Firm That Managed Her Email Server

Quanta, Wiwynn see more orders from server clients for 2016
Quanta Computer and Wiwynn, a server subsidiary of Wistron, are expected to land more cloud server orders from their clients in 2016 as Internet ...

Server Files Sexual Harassment Complaint Against Pigalle Restaurant
... restaurant Pigalle is being accused of sexual harassment by a waitress , who says that management implied her jeans were "too much." The server ...

Hyper-V, PowerShell Top IT Pros' Windows Server 2016 Wish List
Container support is nice, but most IT pros are looking forward to Hyper-V virtualization updates and new PowerShell capabilities.

Resources last updated: 12/6/2015 9:03:34 AM