While working on a project recently, I was playing around with image resizing and cropping. While I’ve worked with this before, this was the first time I got into it more indepth. I suddenly encountered this error which I found to be horribly bad description for an error. After researching and testing my application, I found that this error typically occurs on two occasions, both having to do with permissions
- No write permissions. If you do not have permission to write or create files on the server, you will receive this error. To rectify this, ensure that your ASP.NET user account has write permission on the server
- Invalid path. If you try to save an image to the server, if the path is not valid then you will receive this error. Best to go into debug mode and manually confirm that the path you are specifying actually exists before trying to save the file to the server.