ASP.NET - File path - Asked By Naresh Kumar on 09-Sep-11 09:35 AM

Hi All,

I have a page where users will upload files. The folder is created inside the application, so that I am using

fuUploadFile.SaveAs(server.mappath(path) + filename) to upload the files. It is working fine.

Now I need to integrate the same page in another website, Integration part is done. But coming to file upload what is the path I need to give? Folder where the files will upload is in another server.
fuUploadFile.SaveAs(\\serverName\\D\\ApplicationName\\FolderName\\fileName)

I am getting error while using the above path.

Please advise.

server.mappath(path) + filename) to upload the files. It is working fine.Now I need to integrate the same page in another website, Integration part is done. But coming to file upload what is the path I need to give? Folder where the files will upload is in another server.fuUploadFile.SaveAs() I am getting error while using the above path.Please advise.
Rohan Dave replied to Naresh Kumar on 09-Sep-11 09:42 AM
You need to give the Virtual Path of the directory where files going to be saved on another server where you have integrated the page in another website.

fuUploadFile.SaveAs(server.mappath("Virtual Path of directory of another server") + filename)