Hi @mush,
You're getting Server.MapPath(Server.MapPath specifies the relative or virtual path to map to a physical directory), but I can tell from the code that you're not saving the uploaded file to Server.MapPath, so the file won't be found.
fuFamilyPassportUploadFile.SaveAs(Server.MapPath("~/En/files/" & filen))
If fuFamilyPassportUploadFile.HasFile = True Then
Dim filen As String
filen = Path.GetFileName(fuFamilyPassportUploadFile.FileName)
Dim FileExtension As String = Path.GetExtension(fuFamilyPassportUploadFile.FileName)
'Save File to Server.MapPath
fuFamilyPassportUploadFile.SaveAs(Server.MapPath("~/En/files/" & filen))
If FileExtension.ToUpper <> ".PDF" Then
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.