I have an ASP.NET web site. The site has a button that allows you to load your photo on the website and it works without any problems on my local computer. But on server when I want to upload an image, I catch an exception. This is the exception that I catch:
Access to the path 'C:\inetpub\vhosts\u0270481.plsk.regruhosting.ru\httpdocs\ps-plus.pro\UsersIcons\259b60ca-16de-4168-8b45-900f7078bcea.png' is denied.
There is a code I use:
FileUpload1.SaveAs(Server.MapPath(String.Format("UsersIcons/{0}", userIcoName)));