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

Last Reply one month ago By dharmendr

Posted one month 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="192.168.150.78/ImageProcessService/Images/" />

 

You are viewing reply posted by: dharmendr one month ago.
Posted one month 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.