View Full Version : Upload a file to different server with the web application server

02-02-2007, 02:20 AM
Hi All,

I have problem with the upload the file to the diffrent server with the web application server. How to write the File1.PostedFile.SaveAs()????? to located to other server.

IF the normal case for upload is to own server same with the web application the code is below
//string FilePath="c:\\Inetpub\\wwwroot\\Nanya\\Upload\\";

BUT for my case i want to upload my file to the server that not same as my web application that means my web application is at Server A but i want upload my file to Server B from Server A
and i write the code below

string FilePath="\\Server B\\C$\\Inetpub\\wwwroot\\Nanya\\Upload\\";

and the error is "Cant find the part of C:\ServerB\C$\Inetpub\wwwroot\Nanya\Upload\"

Any one can help me urgent??

02-12-2007, 09:31 PM
Can you create a virtual directory in IIS that point to the location on the other mapped server/machine?

I do something similar in a app I wrote where I store scanned images on a remote drive and I just created a virtual directory in my app that pointed to the location on the mapped drive.

Works like a charm!



02-21-2007, 01:23 PM
Just ignore this post... sorry