Hey I have a page with an upload control and a linkbutton, the linkbutton has a onclick event that does :
Random N = new Random();
int Number = N.Next(0, 999);
FileUpload1.SaveAs(Server.MapPath(@"~/pictures/4/" + Number + ".jpg"));
but this gives me the error :
Access to the path '\\fs2-n01\stor1wc2dfw1\423701\www.cityverse.co.uk\web\content\picturethis\4\483.jpg' is denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path '\\fs2-n01\stor1wc2dfw1\423701\www.cityverse.co.uk\web\content\picturethis\4\483.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET ...
Go to the complete details ...