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

  1. So, when using .SaveAs and passing in the UNC path to the new server location I get an *Access denied* error messgae.
  2. 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?



Application Developer
7/2/2008 10:56:05 PM 93655 articles. 5 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 56

Make sure that the account running web applicaiton(default NETWORK_SERVICE) has write access to the different machine.


If you find my reply help you Mark it Answered.
7/2/2008 11:14:33 PM

So, I simply *opened* the entire server for anybody with full control. I added NETWORK SERVICE and ASPNET to the local admins. I alse granted *EVERYONE* and NETWORK SERVICE and ASPNET full control over the folder I am trying to upload the file into...still access denied.

 The crazy things is, being in Visaul Studio on my dev machine the uplaod to the other servers works. As soon as I put it on the production web server it fails. This is getting really frustrating.

thanks for your help though...


Application Developer
7/3/2008 2:29:10 AM

You dont need to give permissions for every one or add to admin group that would be a security threat. Have you added the user to the folder on another machine ?

for ex:

Machine1, Machine 2

Machine1 is running the WebApplication.

You have folder Folder1 in Machine2 ie it can be accessed form Machine1 \\Machine2\Folder1.

Now in Machine2 where you share this folder add Machine1\NETWORK_SERVICE account to have write permissions to that folder.

That way you can write to a network share.

Best way is to create a domain account and then add the account to IIS_WPG and also to the network share.



If you find my reply help you Mark it Answered.
7/3/2008 3:03:05 AM

Similar Artilces:

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

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

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

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

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

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

unable to start debugging on the web server. the web server did not respond in a timely manner. this may be because another debugger is already attached to the web server.
When i start debugging, it looks like it's going to work and the VS toolbars change to show the debugging toolbar options. However the cursor changes to the "busy" cursor and vista 'ghosts out' VS 2008 indicates that it's "not responding" in the title bar. The web browser never starts up and if you I it several minutes I get the following error: "Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server." HOWEVER, if you then im...

aspx form works in Visual Studio web server but not on my main IIS web server.
Hi all,  I have a simple form that works fine in the VS local web server but when I copy the files (index.aspx, index.aspx.vb, web.config) to my IIS server I can see the form but when I click the hyperlink the form doesn't work. It is as if the .aspx can't execute the .aspx.vb page. Any ideas why this would be?  This is my first project so I am a complete novice here. Thanks.  My aspx code: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="login.aspx.vb" Inherits="Default2" %> <html xmlns=...

How to pull data from a remote server to the web server. Initiated by the web server session.
Hello.I am brand new to Just starting to do web development. However I do have extensive software experience developingapplications on local networks, mobile devices,, remoting,etc. Here is the senario:    Bob delivers bottled water to several hundred accounts.    Bob keeps all information regarding his accounts in an    SQL server located at site A.  Bob has an application    hosted on a web server at site B.  Bob wants to allow his     accounts to log in to the web serve...

How to upload/download the folder and its contents from web server to local machine and local machine to web server
Hi, i am using with c# and creating the web project In my project Now I am using the Button and listbox and on button click event I am using the code protected void AddFolder_Click(object sender, EventArgs e) { string strPath = ""; string strCaption = "Browse a directory for uploading Album."; //DialogResult dlgResult; string dlgResult = ""; Shell32.ShellClass shl = new Shell32.ShellClass(); Shell32.Folder2 fld = (Shell32.Folder2)shl.BrowseForFolder(0, strCaption, 0, System.Reflection.Mis...

Unable to start debugging on the web server. The debugger is not registered on the web server computer. Visual Studio or the full remote debugger components must be installed on the web server!
Can somebody help me with this error message i get this when i want to debug my web application. I looked on the web many sites are talking about it but no one gives a good explanation for it. I use VS 2005, My OS is Windows XP professional 64 bits(Maybe this is the cause!) And the web prject is a Shop online. Thanks for your help!!  I think you should register IIS with Framework 2.0; How? run the below command on Command Prompt. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i Hope it will work. Regards,  Ather Ali ShaikhSr. System AnalystGASCO Abu Dhabi,...

Error When Debugging (Unable to start debugging on the web server. Unable to connect to the web server. Varify that the web server is running and that incoming HTTP request are not blocked by a firewa
Hi, When im going to run website its giving this error. Unable to start debugging on the web server. Unable to connect to the web server. Varify that the web server is running and that incoming HTTP request are not blocked by a firewall.  please help me to solve this problem. Thank you. Pubudu  If you are running your site off of a different machine than you are developing on, you need to install and configure the Visual Studio Remote Debugger on that machine. try to change the address from http://localhost to http://yourIP...   i hope it's worked...mak...

Create our own Web Server- free web server
It sounds a bit crazy but I do really hope to do so. Currently the hosting cost for running ASP.NET is expensive comparing to LAMP solution. Now we have free DB, free developer tools, except 'A'- in order to run a productional web server the only choice in Windows is IIS 6.0, which means another couple thousands dollars. If we can create a web server independent of OS, we can run a web server as cheap as $0, provided that we got windows 2000 pro/xp home. The Web Server edition of Windows Server is very cheap actualy. More expensive than a Win XP Home, of course...but defina...

Web resources about - File upload to a server other than the web server. -

Wikipedia:File Upload Wizard - Wikipedia, the free encyclopedia
You are not currently logged in. Sorry, in order to use this uploading script and to upload files, you need to be logged in with your named ...

Video On Instagram: 5M Uploads In First 24 Hours
How quickly did Video on Instagram catch on? CNET reported that 5 million videos were uploaded in the first 24 hours after the feature debuted ...

Hans de Borst - Handy-Uploads - Facebook
English version - made by Lennart Peeters. Thank you very much mister Putin, leaders of the separatists or the Ukraine government! For murdering ...

Visit the post for more.

Manage folders and upload files, now in Amazon Cloud Drive
... recent update should cheer you up. The updated version, released on Oct. 10, brings great new features that allow you to manage folders, upload ...

Coming Soon: Facebook Will Ask If You’re Really, Really Sure You Want To Upload That Photo From Last ...
... artificial intelligence knows better: the social media behemoth is working on technology that will warn users when they’re about to upload photos ...

Guy Uploads A Ton Of KMart Background Music To The Internet
... worked at K-Mart. Part of his job was playing pre-recorded cassettes sent in from the corporate office. Luckily for us, he saved them and uploaded ...

Twitch announces VOD feature and video uploads
At it's first-annual TwitchCon, the video-streaming service announced that broadcasters will be able to schedule saved streams and uploaded videos ...

Shaun White: I Can Upload A Video Of Me Getting A Haircut And Get 4M Views
The Olympic gold medalist turned entrepreneur talks about the power of the Internet – and his own power - to reach fans.

England Uploads Free Digital Model of the Entire Country After Minecraft Players Ask For It
Laser scanning has helped England do everything from discovering new things about Stonehenge to planning better flood infrastructure . Now, the ...

Resources last updated: 12/26/2015 11:33:06 AM