Uploading files to a different file server but not web server


I want to upload files to a different file server than the web server using asp.net, 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!!!

8/21/2007 10:42:14 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 58
Get it on Google Play
Get it on Apple App Store

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 server first, then copy it over.  This usually sounds like a much simpler task than it ends up being.  Copying to a fileshare usually isnt that difficult except for permissions, FTP gets harder, because there isnt built in wrappers for FTP functions in .NET - HTTP of course requires that the fileserver computer is specifically listening for an HTTP post of some sort, which usually means it must be running some form of IIS.

Bryan Sampica
Auction Site StarterKit |
My Blog
8/22/2007 12:15:59 AM


Do you have a sample code for it or some direction how I can start off? I am new to .NET. So just please give me some sample code.



8/22/2007 3:15:24 PM


My problem is I want to provide the ability to user to upload files. But I don't have enough space on my web server. So I want to  place the files on a different file server using FTP protocal. How do I achieve this?

experts:Pls pour ur suggestions..


8/22/2007 6:42:25 PM

There is no simple solution to what your asking, and explaining it to you is beyond the scope of "help" and borders on the scope of writing it for you. 

You can see this article to create your own FTP client wrapper - which may do exactaly what you need.  My advice to you at this point is start to go through it, if you run into problems please dont hesitate to post back with your issue, and we'll see if we can get you through it.


Bryan Sampica
Auction Site StarterKit |
My Blog
8/22/2007 7:06:40 PM

Similar Artilces:

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

File upload to a server other than the web server.
I have a very simple asp.net 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 asp.net web applicaiton(defa...

Move files from a web server to another web server
I am migriting my site from asp.3.0 to asp.net and I am used to simply copy files from my dev server to production server when my files are ready to go public. With asp.net 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...

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

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

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

How to File Upload in file server by using web application C#
Currently I am working to upload a csv file  Upload in file server (not on webserver) getting error , I map Y drive to our file server. (y=\\fileserver\load\) Could not find a part of the path 'Y:\LeadsUpload\errorfixsales.xls'. 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.DirectoryNotFoundException: Could not find a part of the path 'Y:\LeadsUpload\errorfixsales.xls'.   FileUpLoad1...

How to upload or copy file from web server to remote sql server
  Hi All,   q. How to upload or copy file from web server to remote server..?.  I want to uploaded excel file from client machine to remote sql server via web server.   i did 1st part and i dont know how to send file from wbe server to remote database server  pls give me solution or usefull links iif any one knows how to do this ..   Thanks in advance.     Are you saying you want to send the file there, or extract the spreadsheet data and put it into a database table?    If the former, I suggest setti...

File Upload on file server not on webserver, by using web application C#
I know how to upload files on webserver, but when trying to upload a file on different machine getting  error I am trying with FileUpLoad1.SaveAs(@"\\enterprise\LeadsUpload" + FileUpLoad1.FileName);getting error Logon failure: unknown user name or bad password.  please help.DostMy website The server services authentication credentials don't have access to your unc path. Why not create a virtual path under you webserver that points to the unc provide the necessary credentials and then write to that path versus the unc path.  Which would also b...

How to File Upload and Download file ( .doc/.pdf/.gif/.exl) from server web browser C#
How to File Upload and Download file ( .doc/.pdf/.gif/.exl) from server web browser Please help me Thanking you Saikat   Uploading: Try a Google search for upload file web server asp.net c#. Download: <a href="http://www.mydomain.com/pathtofile">Download Me</a> HTH,RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question HiI want to download this logo.gif . It is possable to download. Download: <a href="http://www.google.com/intl/en/images/logo.gif">Download Me</a> and How to File Upload .doc/.pdf/.gif/.exl file we...

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

Is that need to upload "global.asax", "web.config" file to web server?
hi all...here is my problem......... Is that need to upload "global.asax", "web.config" file to web server? let say my asp.net main form is "WebForm1.aspx, after i upload WebForm1.aspx to webserver, Is that need to upload "global.asax", "web.config" or other file to the website? Hi, You need to upload your web.config file. If you are making use of your global.asax, then you need to upload the same. Making use, per say, you are storing some application variables etc., in the global.asax.vb or .cs files. Note that you don't nee...

How to Upload a File on Web Server
Hi.. I am working on a project where i have to upload a image file on the webserver with following certira : 1) Image must be gif or jpeg 2) size not more than 300kb How i can i do the same Importantly How to Upload a file on webserver... Thanks in advance Sumit GuptaSumit Gupta (MCSD/ CCNA) http://www.vikasumit.com There are tons of site on the internet that explain this in detail (Google results). However, I'll cover the basic idea over here: 1. use the <input id="filMyFile" type="file" runat="server"> control 2. set the...

Web resources about - Uploading files to a different file server but not web server - asp.net.web-forms

Uploading and downloading - Wikipedia, the free encyclopedia
Examples of a remote system from which a download might be performed include a web server , FTP server, email server, or other similar systems. ...

Facebook Lets You Tag Photos While They're Uploading
Facebook now lets you add tags to photos before they're finished uploading.

Facebook for iPhone 3.0 to Include Video Uploading for 3GS Owners
We’ve heard a lot of people say the iPhone’s built-in support for YouTube video uploading is going to make a huge impact on the number of people ...

Defence bureaucrat pleads guilty to uploading secret document online
... embarrassing security breach with &quot;Five Eyes&quot; intelligence document. A former junior Defence bureaucrat has pleaded guilty to uploading ...

Uploading Bautista bat flip GIFs could get you sued under TPP, copyright activists warn
Copyright activists say Canadians could face lawsuits, fines or worse for ripping the latest Justin Bieber CD or uploading an animated GIF of ...

Xiaomi apologizes for uploading address book data from smartphones without permission
Former Android head and Xiaomi VP Hugo Barra has apologized to owners of its smartphones for "any concern caused" by collecting contact data ...

Senator calls for FTC investigation of Apple and Google over stealth photo uploading capabilities
Is this how we’ll have to open apps in the future? When we broke the news that iOS (and later Android) apps could upload your photo library (along ...

YouTubers Now Uploading Over 35 Hours Of Video Per Minute!
This week YouTube's got some big news! YouTubers are now uploading over 35 hours of video per minute, up from 24 hours a minute in March.

Google Play Books updated with new design, PDF and EPUB uploading
Caught up in all of the hullabaloo around the keynote, Google Play Books received a notable update in the Play Store to not only bring new UI ...

Twitter rolling out group messaging, 30-second video uploading
Fast Company Twitter rolling out group messaging, 30-second video uploading Android Community Different social networks are doing everything ...

Resources last updated: 1/21/2016 5:14:01 AM