[Solved] ASP.Net Error: Path is not a valid virtual path

Last Reply 5 months ago By dharmendr

Posted 5 months ago

Hi Team,

With reference to below link i want save a file on different serve path as below.

I am getting error like  

http://jungle.com/ImageProcessImages/ is not a valid virtual path.

Upload files, save in folder and display in ASP.Net GridView with Download and Delete option

Please look into this.

Have tried but getting same error. 

FileUpload1.PostedFile.SaveAs(Server.MapPath("~") + @"http:\jungle.com\ImageProcessService\Images\" + fileName);


string savePath = WebConfigurationManager.AppSettings["Path"];
savePath = "~/" +savePath+""; FileUpload1.PostedFile.SaveAs((Server.MapPath(savePath) + fileName));


<add key="Path" value="" />


You are viewing reply posted by: dharmendr 5 months ago.
Posted 5 months ago

First you need to verify the path is correct or not.

Make sure that folder Images is available while saving file. If it does not exist then create it.

If the path is correct and folder exists, you need to provided read and write permissions to the folder.