Public Function UploadThisFile(ByVal upload As FileUpload) Dim theFilename As String Dim str_Custfilename As String If upload.HasFile Then str_Custfilename = upload.FileName theFilename = Path.Combine(HttpContext.Current.Server.MapPath("~/uploadedimages/"), str_Custfilename) upload.SaveAs(theFilename) ' the file name is theFileName needs to be stored in the database. System.Threading.Thread.Sleep(8000) Else str_Custfilename = "default_news.jpg" End If Return "/uploadedimages/" + str_Custfilename End Function
Access to the path 'D:\CustomerData\webspaces\webspace_00110365\wwwroot\uploadedimages\blackflag.jpg' is denied. Line 105: str_Custfilename = upload.FileName Line 106: theFilename = Path.Combine(HttpContext.Current.Server.MapPath("~/uploadedimages/"), str_Custfilename) Line 107: upload.SaveAs(theFilename) Line 108: ' the file name is theFileName needs to be stored in the database. Line 109: System.Threading.Thread.Sleep(8000)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)