I have an ASP.NET web application, created in Visual Studio 2017.
In the application there is a form, where the users can upload files. When files are uploaded, I process them and I save them on the filesystem:
var photo = Request.Files["file"];
photo.SaveAs("D:\\home");
Everything works perfect locally, but it's not working when I deploy the App on Azure App Services.
I read that, on Azure, the path
D:\home
should be writable.
But when I try the code I get this error:
Access to the path 'd:\home\test_image.JPG' is denied.
d:\home
probably doesn't (even) exist. Have a look at @sprinter252 's answer, or get the temp folder, or use storage. - rickvdbosch